pub struct StrRef(/* private fields */);Expand description
TLK string-reference wrapper shared across KotOR formats.
Most formats store string references as signed 32-bit integers where -1
means “unset/no string”.
Implementations§
Source§impl StrRef
impl StrRef
Sourcepub fn from_index(index: u32) -> Result<Self, StrRefError>
pub fn from_index(index: u32) -> Result<Self, StrRefError>
Creates a string reference from a non-negative TLK index.
Sourcepub const fn is_invalid(self) -> bool
pub const fn is_invalid(self) -> bool
Returns true if this value is the unset sentinel (-1).
Trait Implementations§
Source§impl Ord for StrRef
impl Ord for StrRef
Source§impl PartialOrd for StrRef
impl PartialOrd for StrRef
impl Copy for StrRef
impl Eq for StrRef
impl StructuralPartialEq for StrRef
Auto Trait Implementations§
impl Freeze for StrRef
impl RefUnwindSafe for StrRef
impl Send for StrRef
impl Sync for StrRef
impl Unpin for StrRef
impl UnwindSafe for StrRef
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