Struct attribute_derive::from_partial::Defaulting
source · pub struct Defaulting<T>(pub T);
Expand description
FromPartial
wrapper that uses Default
value when not specified.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Clone> Clone for Defaulting<T>
impl<T: Clone> Clone for Defaulting<T>
source§fn clone(&self) -> Defaulting<T>
fn clone(&self) -> Defaulting<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for Defaulting<T>where
T: Freeze,
impl<T> RefUnwindSafe for Defaulting<T>where
T: RefUnwindSafe,
impl<T> Send for Defaulting<T>where
T: Send,
impl<T> Sync for Defaulting<T>where
T: Sync,
impl<T> Unpin for Defaulting<T>where
T: Unpin,
impl<T> UnwindSafe for Defaulting<T>where
T: 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
source§impl<P, T> FromPartial<Defaulting<P>> for Twhere
T: Default + FromPartial<P>,
impl<P, T> FromPartial<Defaulting<P>> for Twhere
T: Default + FromPartial<P>,
source§fn from_option(partial: Option<Defaulting<P>>, _error: &str) -> Result<T, Error>
fn from_option(partial: Option<Defaulting<P>>, _error: &str) -> Result<T, Error>
source§fn join(
first: Option<SpannedValue<T>>,
second: SpannedValue<T>,
specified_twice_error: &str,
) -> Result<Option<SpannedValue<T>>>
fn join( first: Option<SpannedValue<T>>, second: SpannedValue<T>, specified_twice_error: &str, ) -> Result<Option<SpannedValue<T>>>
Defines how two arguments for the same parameter should be handled. Read more
source§impl<T> FromPartial<T> for T
impl<T> FromPartial<T> for T
source§fn join(
first: Option<SpannedValue<T>>,
second: SpannedValue<T>,
specified_twice_error: &str,
) -> Result<Option<SpannedValue<T>>>
fn join( first: Option<SpannedValue<T>>, second: SpannedValue<T>, specified_twice_error: &str, ) -> Result<Option<SpannedValue<T>>>
Defines how two arguments for the same parameter should be handled. Read more