pub struct StaticLayout { /* private fields */ }Expand description
A precomputed layout for a type whose encoded BSATN and BFLATN lengths are both known constants, enabling fast BFLATN <-> BSATN conversions.
Implementations§
Source§impl StaticLayout
impl StaticLayout
Sourcepub fn for_row_type(row_type: &RowTypeLayout) -> Option<Self>
pub fn for_row_type(row_type: &RowTypeLayout) -> Option<Self>
Construct a StaticLayout for converting BFLATN rows of row_type <-> BSATN.
Returns None if row_type contains a column which does not have a constant length in BSATN,
either a [VarLenType]
or a SumTypeLayout whose variants do not have the same “live” unpadded length.
Trait Implementations§
Source§impl Clone for StaticLayout
impl Clone for StaticLayout
Source§fn clone(&self) -> StaticLayout
fn clone(&self) -> StaticLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticLayout
impl Debug for StaticLayout
Source§impl MemoryUsage for StaticLayout
impl MemoryUsage for StaticLayout
Source§fn heap_usage(&self) -> usize
fn heap_usage(&self) -> usize
The heap memory usage of this type. The default implementation returns 0.
Source§impl PartialEq for StaticLayout
impl PartialEq for StaticLayout
impl Eq for StaticLayout
impl StructuralPartialEq for StaticLayout
Auto Trait Implementations§
impl Freeze for StaticLayout
impl RefUnwindSafe for StaticLayout
impl Send for StaticLayout
impl Sync for StaticLayout
impl Unpin for StaticLayout
impl UnwindSafe for StaticLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more