pub enum ValueSize<'v, ValueType> {
Const(usize),
Variable(&'v dyn Fn(&ValueType) -> usize),
}Expand description
Points the number of bytes needed to store value of the type ValueType.
This number of bytes can be constant or can depend on the value.
Variants§
Const(usize)
Holds constant number of bytes needed to store each value.
Variable(&'v dyn Fn(&ValueType) -> usize)
Holds callback that shows the number of bytes needed to store given value.
Auto Trait Implementations§
impl<'v, ValueType> Freeze for ValueSize<'v, ValueType>
impl<'v, ValueType> !RefUnwindSafe for ValueSize<'v, ValueType>
impl<'v, ValueType> !Send for ValueSize<'v, ValueType>
impl<'v, ValueType> !Sync for ValueSize<'v, ValueType>
impl<'v, ValueType> Unpin for ValueSize<'v, ValueType>
impl<'v, ValueType> !UnwindSafe for ValueSize<'v, ValueType>
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