Struct varlen::FixedLenLayout
source · [−]pub struct FixedLenLayout<T>(_);
Expand description
The variable-length layout of a fixed-length type.
Examples
use varlen::prelude::*;
use varlen::Layout as _;
let layout = FixedLen(4u16).calculate_layout_cautious().unwrap();
assert_eq!(layout.size(), std::mem::size_of::<u16>());
Trait Implementations
sourceimpl<T> Layout for FixedLenLayout<T>
impl<T> Layout for FixedLenLayout<T>
sourceimpl<T> PartialEq<FixedLenLayout<T>> for FixedLenLayout<T>
impl<T> PartialEq<FixedLenLayout<T>> for FixedLenLayout<T>
impl<T> Eq for FixedLenLayout<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for FixedLenLayout<T> where
T: RefUnwindSafe,
impl<T> Send for FixedLenLayout<T> where
T: Send,
impl<T> Sync for FixedLenLayout<T> where
T: Sync,
impl<T> Unpin for FixedLenLayout<T> where
T: Unpin,
impl<T> UnwindSafe for FixedLenLayout<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more