pub enum Narrowed<T> {
Value(T),
Default,
}Expand description
What a narrowing decided.
Default and not the default value itself: Table 9’s default for a
type is a language value the runtime cannot spell — an empty
Vec, a struct literal with a value per member, an enumeration’s
first literal — and the generated code has it already, from the same
table the other three columns derive theirs from.
Variants§
Value(T)
Keep this value. It either fitted or was trimmed to fit.
Default
Substitute the receiving member’s default value.
Trait Implementations§
impl<T: Eq> Eq for Narrowed<T>
impl<T: PartialEq> StructuralPartialEq for Narrowed<T>
Auto Trait Implementations§
impl<T> Freeze for Narrowed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Narrowed<T>where
T: RefUnwindSafe,
impl<T> Send for Narrowed<T>where
T: Send,
impl<T> Sync for Narrowed<T>where
T: Sync,
impl<T> Unpin for Narrowed<T>where
T: Unpin,
impl<T> UnsafeUnpin for Narrowed<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Narrowed<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