#[repr(C)]pub struct MetadataRec {
pub block_kind: [u8; 32],
pub terminator: [u8; 64],
pub byte_start: u64,
pub byte_end: u64,
pub start_line: u64,
pub start_col: u64,
pub end_line: u64,
pub end_col: u64,
pub _padding: [u8; 32],
}Expand description
Fixed-size record for CFG block metadata (176 bytes for string storage) Stores terminator type and location info for each block
Fields§
§block_kind: [u8; 32]Null-terminated string for block kind (max 31 bytes + null)
terminator: [u8; 64]Null-terminated string for terminator type (max 63 bytes + null)
byte_start: u64§byte_end: u64§start_line: u64§start_col: u64§end_line: u64§end_col: u64§_padding: [u8; 32]Implementations§
Source§impl MetadataRec
impl MetadataRec
pub const SIZE: usize = 176
Sourcepub fn from_strings(
block_kind: &str,
terminator: &str,
byte_start: u64,
byte_end: u64,
start_line: u64,
start_col: u64,
end_line: u64,
end_col: u64,
) -> Self
pub fn from_strings( block_kind: &str, terminator: &str, byte_start: u64, byte_end: u64, start_line: u64, start_col: u64, end_line: u64, end_col: u64, ) -> Self
Create from string values
Sourcepub fn get_block_kind(&self) -> String
pub fn get_block_kind(&self) -> String
Get block kind as string
Sourcepub fn get_terminator(&self) -> String
pub fn get_terminator(&self) -> String
Get terminator as string
Trait Implementations§
Source§impl Clone for MetadataRec
impl Clone for MetadataRec
Source§fn clone(&self) -> MetadataRec
fn clone(&self) -> MetadataRec
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 MetadataRec
impl Debug for MetadataRec
Source§impl Default for MetadataRec
impl Default for MetadataRec
impl Copy for MetadataRec
impl Pod for MetadataRec
Auto Trait Implementations§
impl Freeze for MetadataRec
impl RefUnwindSafe for MetadataRec
impl Send for MetadataRec
impl Sync for MetadataRec
impl Unpin for MetadataRec
impl UnsafeUnpin for MetadataRec
impl UnwindSafe for MetadataRec
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.