pub struct SymbolTableEntry {
pub link_name_offset: u64,
pub object_header_address: u64,
pub cache_type: u32,
pub scratch: [u8; 16],
/* private fields */
}Expand description
A symbol table entry (used in v0/v1 superblock and in SNOD nodes).
When cache_type is 1 (group), the scratch-pad space contains the address
of the B-tree and local heap for the group. When cache_type is 2, the
scratch-pad contains a symbolic link offset. These are extracted during
parsing and cached for convenience.
Fields§
§link_name_offset: u64Offset of the link name within the local heap data segment.
object_header_address: u64Address of the object header for the target object.
cache_type: u32Cache type: 0 = nothing cached, 1 = group info, 2 = symbolic link.
scratch: [u8; 16]Raw scratch-pad bytes (always 16 bytes in the file).
Implementations§
Source§impl SymbolTableEntry
impl SymbolTableEntry
Sourcepub fn parse(
cursor: &mut Cursor<'_>,
offset_size: u8,
_length_size: u8,
) -> Result<Self>
pub fn parse( cursor: &mut Cursor<'_>, offset_size: u8, _length_size: u8, ) -> Result<Self>
Parse a single symbol table entry from the cursor.
The format is:
- Link name offset (
offset_sizebytes) - Object header address (
offset_sizebytes) - Cache type (u32 LE)
- Reserved (u32 LE)
- 16 bytes scratch-pad
Sourcepub fn btree_address(&self) -> Option<u64>
pub fn btree_address(&self) -> Option<u64>
Address of the B-tree for this group (only valid when cache_type == 1).
Sourcepub fn local_heap_address(&self) -> Option<u64>
pub fn local_heap_address(&self) -> Option<u64>
Address of the local heap for this group (only valid when cache_type == 1).
Trait Implementations§
Source§impl Clone for SymbolTableEntry
impl Clone for SymbolTableEntry
Source§fn clone(&self) -> SymbolTableEntry
fn clone(&self) -> SymbolTableEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SymbolTableEntry
impl RefUnwindSafe for SymbolTableEntry
impl Send for SymbolTableEntry
impl Sync for SymbolTableEntry
impl Unpin for SymbolTableEntry
impl UnsafeUnpin for SymbolTableEntry
impl UnwindSafe for SymbolTableEntry
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
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>
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>
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