pub struct Location {
pub pack_id: u32,
pub entry_size: usize,
pub pack_offset: Offset,
}
Expand description
A way to uniquely identify the location of an entry within a pack bundle
Fields§
§pack_id: u32
The id of the pack containing the object. It’s unique within its frame of reference which is the owning object database.
entry_size: usize
The size of the entry of disk so that the range of bytes of the entry is pack_offset..pack_offset + entry_size
.
pack_offset: Offset
The start of the entry in the pack identified by pack_id
.
Implementations§
Source§impl Location
impl Location
Sourcepub fn entry_range(&self, pack_offset: Offset) -> EntryRange
pub fn entry_range(&self, pack_offset: Offset) -> EntryRange
Compute a range suitable for lookup in pack data using the entry_slice()
method.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Location
impl<'de> Deserialize<'de> for Location
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Location
impl Ord for Location
Source§impl PartialOrd for Location
impl PartialOrd for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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