pub struct StringRef(pub u32);
Expand description
A reference to a string in the string table.
This type stores an offset into the global string table of the PDB. To retrieve the string
value, use to_raw_string
, to_string_lossy
or
methods on StringTable
.
Tuple Fields
0: u32
Implementations
sourceimpl StringRef
impl StringRef
sourcepub fn to_raw_string<'s>(
self,
strings: &'s StringTable<'_>
) -> Result<RawString<'s>>
pub fn to_raw_string<'s>(
self,
strings: &'s StringTable<'_>
) -> Result<RawString<'s>>
Resolves the raw string value of this reference.
This method errors if the offset is out of bounds of the string table. Use
PDB::string_table
to obtain an instance of the string table.
sourcepub fn to_string_lossy<'s>(
self,
strings: &'s StringTable<'_>
) -> Result<Cow<'s, str>>
pub fn to_string_lossy<'s>(
self,
strings: &'s StringTable<'_>
) -> Result<Cow<'s, str>>
Resolves and decodes the UTF-8 string value of this reference.
This method errors if the offset is out of bounds of the string table. Use
PDB::string_table
to obtain an instance of the string table.
Trait Implementations
sourceimpl Ord for StringRef
impl Ord for StringRef
sourceimpl PartialOrd<StringRef> for StringRef
impl PartialOrd<StringRef> for StringRef
sourcefn partial_cmp(&self, other: &StringRef) -> Option<Ordering>
fn partial_cmp(&self, other: &StringRef) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for StringRef
impl Eq for StringRef
impl StructuralEq for StringRef
impl StructuralPartialEq for StringRef
Auto Trait Implementations
impl RefUnwindSafe for StringRef
impl Send for StringRef
impl Sync for StringRef
impl Unpin for StringRef
impl UnwindSafe for StringRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more