pub struct BinaryRecord { /* private fields */ }Expand description
A record with dynamic field access for binary format.
Used for PCB records which are stored in binary format rather than pipe-delimited parameters. Preserves raw bytes for lossless round-tripping.
Implementations§
Source§impl BinaryRecord
impl BinaryRecord
Sourcepub fn from_binary(object_id: PcbObjectId, data: Vec<u8>) -> Self
pub fn from_binary(object_id: PcbObjectId, data: Vec<u8>) -> Self
Creates a BinaryRecord from raw data and object ID.
Sourcepub fn from_binary_with_fields(
object_id: PcbObjectId,
data: Vec<u8>,
fields: IndexMap<String, Value>,
) -> Self
pub fn from_binary_with_fields( object_id: PcbObjectId, data: Vec<u8>, fields: IndexMap<String, Value>, ) -> Self
Creates a BinaryRecord with pre-parsed fields.
Sourcepub fn object_id(&self) -> PcbObjectId
pub fn object_id(&self) -> PcbObjectId
Returns the object type ID.
Sourcepub fn has_fields(&self) -> bool
pub fn has_fields(&self) -> bool
Returns true if fields have been parsed.
Sourcepub fn is_modified(&self) -> bool
pub fn is_modified(&self) -> bool
Returns true if the record was modified.
Trait Implementations§
Source§impl Clone for BinaryRecord
impl Clone for BinaryRecord
Source§fn clone(&self) -> BinaryRecord
fn clone(&self) -> BinaryRecord
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 BinaryRecord
impl Debug for BinaryRecord
Auto Trait Implementations§
impl Freeze for BinaryRecord
impl RefUnwindSafe for BinaryRecord
impl Send for BinaryRecord
impl Sync for BinaryRecord
impl Unpin for BinaryRecord
impl UnwindSafe for BinaryRecord
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<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