pub struct Trailing<T>(/* private fields */);
Expand description
A wrapper type without an implementation of Deserialize
which allows a special implementation of Wrap
for functions
that take a trailing default parameter.
Implementations§
Source§impl<T: DeserializeOwned> Trailing<T>
impl<T: DeserializeOwned> Trailing<T>
Sourcepub fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T
pub fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T
Returns an underlying value or computes it if not present.
Source§impl<T: Default + DeserializeOwned> Trailing<T>
impl<T: Default + DeserializeOwned> Trailing<T>
Sourcepub fn unwrap_or_default(self) -> T
pub fn unwrap_or_default(self) -> T
Returns an underlying value or the default value.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Trailing<T>where
T: Freeze,
impl<T> RefUnwindSafe for Trailing<T>where
T: RefUnwindSafe,
impl<T> Send for Trailing<T>where
T: Send,
impl<T> Sync for Trailing<T>where
T: Sync,
impl<T> Unpin for Trailing<T>where
T: Unpin,
impl<T> UnwindSafe for Trailing<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