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
pub fn drop_type(&mut self)
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 From<PakTypedPointer> for PakPointer
impl From<PakTypedPointer> for PakPointer
Source§fn from(value: PakTypedPointer) -> Self
fn from(value: PakTypedPointer) -> Self
Converts to this type from the input type.
Source§impl From<PakUntypedPointer> for PakPointer
impl From<PakUntypedPointer> for PakPointer
Source§fn from(value: PakUntypedPointer) -> Self
fn from(value: PakUntypedPointer) -> Self
Converts to this type from the input type.
Source§impl Hash for PakPointer
impl Hash for PakPointer
Source§impl<T> PakQueryExpression<T> for PakPointerwhere
T: DeserializeGroup,
impl<T> PakQueryExpression<T> for PakPointerwhere
T: DeserializeGroup,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DeserializeUnit for Twhere
T: for<'de> Deserialize<'de>,
impl<T> DeserializeUnit for Twhere
T: for<'de> Deserialize<'de>,
type ReturnType = T
fn deserialize_unit( pak: &Pak, pointer: &PakPointer, ) -> Result<<T as DeserializeUnit>::ReturnType, PakError>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.