pub enum Default {
Bool(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
F32(u32),
F64(u64),
Enum(u32),
}Expand description
A scalar custom default for a field: the value a reader synthesizes when
the field is absent (see StructReader::get_or_default). v1 supports
scalar defaults only; floats are stored as their bit patterns so the schema
types stay Eq.
Variants§
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(u32)
f32 default, stored as to_bits().
F64(u64)
f64 default, stored as to_bits().
Enum(u32)
Trait Implementations§
impl Copy for Default
impl Eq for Default
impl StructuralPartialEq for Default
Auto Trait Implementations§
impl Freeze for Default
impl RefUnwindSafe for Default
impl Send for Default
impl Sync for Default
impl Unpin for Default
impl UnsafeUnpin for Default
impl UnwindSafe for Default
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