pub enum TryIntoValue<TValue, TBuilder> {
Value(TValue),
Builder(TBuilder),
}
Expand description
The result of attempting to pull a value out of a builder.
Calling try_into_value
will return TryIntoValue::Value
if the builder has been given an explicit value.
It will return TryIntoValue::Builder
with the original builder if it hasn’t been given an explicit value.
Calling into_value
will never fail, because if a value is missing it’s constructed from the default function.
Variants§
Auto Trait Implementations§
impl<TValue, TBuilder> Freeze for TryIntoValue<TValue, TBuilder>
impl<TValue, TBuilder> RefUnwindSafe for TryIntoValue<TValue, TBuilder>where
TValue: RefUnwindSafe,
TBuilder: RefUnwindSafe,
impl<TValue, TBuilder> Send for TryIntoValue<TValue, TBuilder>
impl<TValue, TBuilder> Sync for TryIntoValue<TValue, TBuilder>
impl<TValue, TBuilder> Unpin for TryIntoValue<TValue, TBuilder>
impl<TValue, TBuilder> UnwindSafe for TryIntoValue<TValue, TBuilder>where
TValue: UnwindSafe,
TBuilder: 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