pub struct LnmpRecord { /* private fields */ }Expand description
A complete LNMP record (collection of fields)
Implementations§
Source§impl LnmpRecord
impl LnmpRecord
Sourcepub fn get_field(&self, fid: FieldId) -> Option<&LnmpField>
pub fn get_field(&self, fid: FieldId) -> Option<&LnmpField>
Gets a field by field ID (returns the first match if duplicates exist)
Sourcepub fn remove_field(&mut self, fid: FieldId)
pub fn remove_field(&mut self, fid: FieldId)
Removes all fields with the given field ID
Sourcepub fn into_fields(self) -> Vec<LnmpField>
pub fn into_fields(self) -> Vec<LnmpField>
Consumes the record and returns the fields vector
Sourcepub fn sorted_fields(&self) -> Vec<LnmpField>
pub fn sorted_fields(&self) -> Vec<LnmpField>
Returns fields sorted by field ID (stable sort preserves insertion order for duplicates)
Sourcepub fn from_sorted_fields(fields: Vec<LnmpField>) -> Self
pub fn from_sorted_fields(fields: Vec<LnmpField>) -> Self
Creates a record from a vector of fields (typically already sorted)
Sourcepub fn validate_with_limits(
&self,
limits: &StructuralLimits,
) -> Result<(), StructuralError>
pub fn validate_with_limits( &self, limits: &StructuralLimits, ) -> Result<(), StructuralError>
Validates this record against structural limits (depth, field counts, lengths).
Trait Implementations§
Source§impl Clone for LnmpRecord
impl Clone for LnmpRecord
Source§fn clone(&self) -> LnmpRecord
fn clone(&self) -> LnmpRecord
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 LnmpRecord
impl Debug for LnmpRecord
Source§impl Default for LnmpRecord
impl Default for LnmpRecord
Source§fn default() -> LnmpRecord
fn default() -> LnmpRecord
Returns the “default value” for a type. Read more
Source§impl PartialEq for LnmpRecord
impl PartialEq for LnmpRecord
impl StructuralPartialEq for LnmpRecord
Auto Trait Implementations§
impl Freeze for LnmpRecord
impl RefUnwindSafe for LnmpRecord
impl Send for LnmpRecord
impl Sync for LnmpRecord
impl Unpin for LnmpRecord
impl UnwindSafe for LnmpRecord
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