Trait assembly_fdb::value::ValueMapperMut

source ·
pub trait ValueMapperMut<TI, TO>
where TI: Context, TO: Context,
{ // Required methods fn map_string( &mut self, from: &<TI as Context>::String, ) -> <TO as Context>::String; fn map_i64(&mut self, from: &<TI as Context>::I64) -> <TO as Context>::I64; fn map_xml(&mut self, from: &<TI as Context>::XML) -> <TO as Context>::XML; }
Expand description

Trait for mapping value from one context to another

This traits allows us to implement a generic Value::map function that works similar to three FnMut closures but can guarantee that only one of them ever borrows Self mutably at the same time.

Required Methods§

source

fn map_string( &mut self, from: &<TI as Context>::String, ) -> <TO as Context>::String

Called when mapping a string

source

fn map_i64(&mut self, from: &<TI as Context>::I64) -> <TO as Context>::I64

Called when mapping an i64

source

fn map_xml(&mut self, from: &<TI as Context>::XML) -> <TO as Context>::XML

Called when mapping an XML value

Implementors§