pub enum PakPointer {
Typed(PakTypedPointer),
Untyped(PakUntypedPointer),
}
Expand description
A pointer that points to a specific location in the pak file. It comes in two flavors, typed and untyped. This pointer is typically offset by the size of the header.
Variants§
Typed(PakTypedPointer)
Untyped(PakUntypedPointer)
Implementations§
Source§impl PakPointer
impl PakPointer
pub fn new_typed<T>(offset: u64, size: u64) -> Self
pub fn new_untyped(offset: u64, size: u64) -> Self
pub fn offset(&self) -> u64
pub fn size(&self) -> u64
pub fn type_name(&self) -> &str
pub fn as_untyped(&self) -> PakUntypedPointer
pub fn into_typed<T>(self) -> PakTypedPointer
pub fn type_is_match<T>(&self) -> bool
Trait Implementations§
Source§impl Clone for PakPointer
impl Clone for PakPointer
Source§impl Debug for PakPointer
impl Debug for PakPointer
Source§impl<'de> Deserialize<'de> for PakPointer
impl<'de> Deserialize<'de> for PakPointer
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 Hash for PakPointer
impl Hash for PakPointer
Source§impl PartialEq for PakPointer
impl PartialEq for PakPointer
Source§impl Serialize for PakPointer
impl Serialize for PakPointer
impl Eq for PakPointer
impl StructuralPartialEq for PakPointer
Auto Trait Implementations§
impl Freeze for PakPointer
impl RefUnwindSafe for PakPointer
impl Send for PakPointer
impl Sync for PakPointer
impl Unpin for PakPointer
impl UnwindSafe for PakPointer
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