Struct smart_config::de::WithDefault  
source · pub struct WithDefault<T, D> { /* private fields */ }Expand description
Deserializer decorator that defaults to the provided value if the input for the param is missing.
Implementations§
source§impl<T: 'static, De: DeserializeParam<T>> WithDefault<T, De>
 
impl<T: 'static, De: DeserializeParam<T>> WithDefault<T, De>
Trait Implementations§
source§impl<T: 'static, D: Debug> Debug for WithDefault<T, D>
 
impl<T: 'static, D: Debug> Debug for WithDefault<T, D>
source§impl<T: 'static, De: DeserializeParam<T>> DeserializeParam<T> for WithDefault<T, De>
 
impl<T: 'static, De: DeserializeParam<T>> DeserializeParam<T> for WithDefault<T, De>
source§const EXPECTING: BasicTypes = De::EXPECTING
 
const EXPECTING: BasicTypes = De::EXPECTING
Describes which parameter this deserializer is expecting.
source§fn describe(&self, description: &mut TypeDescription)
 
fn describe(&self, description: &mut TypeDescription)
Additional info about the deserialized type, e.g., extended description.
source§fn deserialize_param(
    &self,
    ctx: DeserializeContext<'_>,
    param: &'static ParamMetadata,
) -> Result<T, ErrorWithOrigin>
 
fn deserialize_param( &self, ctx: DeserializeContext<'_>, param: &'static ParamMetadata, ) -> Result<T, ErrorWithOrigin>
Performs deserialization given the context and param metadata. Read more
Auto Trait Implementations§
impl<T, D> Freeze for WithDefault<T, D>where
    D: Freeze,
impl<T, D> RefUnwindSafe for WithDefault<T, D>where
    D: RefUnwindSafe,
impl<T, D> Send for WithDefault<T, D>where
    D: Send,
impl<T, D> Sync for WithDefault<T, D>where
    D: Sync,
impl<T, D> Unpin for WithDefault<T, D>where
    D: Unpin,
impl<T, D> UnwindSafe for WithDefault<T, D>where
    D: UnwindSafe,
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