pub struct SizeBound {
pub bytes: usize,
pub bounded: bool,
pub plain: bool,
}Expand description
What one walk of a schema can say about size.
Fields§
§bytes: usizeBytes, given the starting offset the walk was handed.
bounded: boolFalse once an unbounded String / WString / Sequence is reached —
bytes is then a FLOOR, not a bound, and callers must not size a buffer
from it.
plain: boolNo variable-length member anywhere, so the layout is fixed: bytes is
EXACT rather than an upper bound, and the type is loan-eligible
(phase-380 W5 wires this to borrow_loaned_message /
subscription_supports_in_place rather than letting a second notion of
“fixed layout” grow).
Trait Implementations§
impl Copy for SizeBound
impl Eq for SizeBound
impl StructuralPartialEq for SizeBound
Auto Trait Implementations§
impl Freeze for SizeBound
impl RefUnwindSafe for SizeBound
impl Send for SizeBound
impl Sync for SizeBound
impl Unpin for SizeBound
impl UnsafeUnpin for SizeBound
impl UnwindSafe for SizeBound
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