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 PartialEq for Location
impl PartialEq for Location
source§impl PartialOrd for Location
impl PartialOrd for Location
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)