pub struct StructureDesc {
pub struct_id: Option<String>,
pub fields: Vec<FieldDesc>,
}Expand description
Structure description with optional ID
Fields§
§struct_id: Option<String>§fields: Vec<FieldDesc>Implementations§
Source§impl StructureDesc
impl StructureDesc
pub fn new() -> Self
Sourcepub fn heap_size(&self) -> usize
pub fn heap_size(&self) -> usize
Bytes this description owns on the heap, walked recursively.
Introspection is the one term in the state tracker’s memory estimate
that is both large and expensive to measure: an NTScalar carries
thirty-odd nested FieldDesc nodes, each with its own name. Callers
are expected to cache this at assignment rather than re-walk the tree
on every accounting pass.
Trait Implementations§
Source§impl Clone for StructureDesc
impl Clone for StructureDesc
Source§fn clone(&self) -> StructureDesc
fn clone(&self) -> StructureDesc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StructureDesc
impl Debug for StructureDesc
Source§impl Default for StructureDesc
impl Default for StructureDesc
Auto Trait Implementations§
impl Freeze for StructureDesc
impl RefUnwindSafe for StructureDesc
impl Send for StructureDesc
impl Sync for StructureDesc
impl Unpin for StructureDesc
impl UnsafeUnpin for StructureDesc
impl UnwindSafe for StructureDesc
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