pub struct RawString<'b>(_);
Expand description
RawString
refers to a &[u8]
that physically resides somewhere inside a PDB data structure.
A RawString
may not be valid UTF-8.
Implementations
sourceimpl<'b> RawString<'b>
impl<'b> RawString<'b>
sourcepub fn as_bytes(&self) -> &'b [u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
pub fn as_bytes(&self) -> &'b [u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
Return the raw bytes of this string, as found in the PDB file.
sourcepub fn to_string(&self) -> Cow<'b, str>
pub fn to_string(&self) -> Cow<'b, str>
Returns a UTF-8 String
, substituting in replacement characters as needed.
This uses String::from_utf8_lossy
and thus avoids copying in cases where the original
string was valid UTF-8. This is the expected case for strings that appear in PDB files,
since they are almost always composed of printable 7-bit ASCII characters.
Trait Implementations
sourceimpl<'b> Ord for RawString<'b>
impl<'b> Ord for RawString<'b>
sourceimpl<'b> PartialOrd<RawString<'b>> for RawString<'b>
impl<'b> PartialOrd<RawString<'b>> for RawString<'b>
sourcefn partial_cmp(&self, other: &RawString<'b>) -> Option<Ordering>
fn partial_cmp(&self, other: &RawString<'b>) -> 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<'b> Copy for RawString<'b>
impl<'b> Eq for RawString<'b>
impl<'b> StructuralEq for RawString<'b>
impl<'b> StructuralPartialEq for RawString<'b>
Auto Trait Implementations
impl<'b> RefUnwindSafe for RawString<'b>
impl<'b> Send for RawString<'b>
impl<'b> Sync for RawString<'b>
impl<'b> Unpin for RawString<'b>
impl<'b> UnwindSafe for RawString<'b>
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