pub struct Context { /* private fields */ }
Expand description
Deserialization context.
Implementations§
Source§impl Context
impl Context
Sourcepub fn set_function(
&mut self,
name: impl AsRef<str>,
function: impl Fn(&Deserializer, &Context, &Placeholder) -> Result<Value> + 'static,
) -> &mut Self
pub fn set_function( &mut self, name: impl AsRef<str>, function: impl Fn(&Deserializer, &Context, &Placeholder) -> Result<Value> + 'static, ) -> &mut Self
Set function.
Sourcepub fn with_function(
self,
name: impl AsRef<str>,
function: impl Fn(&Deserializer, &Context, &Placeholder) -> Result<Value> + 'static,
) -> Self
pub fn with_function( self, name: impl AsRef<str>, function: impl Fn(&Deserializer, &Context, &Placeholder) -> Result<Value> + 'static, ) -> Self
Set function.
Sourcepub fn with_override(self, new_value: Value) -> Self
pub fn with_override(self, new_value: Value) -> Self
Override data.
Sourcepub fn override_data(&mut self, new_value: Value) -> &mut Self
pub fn override_data(&mut self, new_value: Value) -> &mut Self
Override data.
Sourcepub fn with_additional_data(self, new_value: Value) -> Self
pub fn with_additional_data(self, new_value: Value) -> Self
Add data.
Sourcepub fn with_directory(self, directory: Option<PathBuf>) -> Self
pub fn with_directory(self, directory: Option<PathBuf>) -> Self
Set directory.
Sourcepub fn set_directory(&mut self, directory: Option<PathBuf>) -> &mut Self
pub fn set_directory(&mut self, directory: Option<PathBuf>) -> &mut Self
Set directory.
Sourcepub fn find(
&self,
deserializer: &Deserializer,
placeholder: &Placeholder,
) -> Result<Value>
pub fn find( &self, deserializer: &Deserializer, placeholder: &Placeholder, ) -> Result<Value>
Find placeholder value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more