pub struct RawString<'b>(/* private fields */);
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§
Source§impl<'b> RawString<'b>
impl<'b> RawString<'b>
Sourcepub fn as_bytes(&self) -> &'b [u8] ⓘ
pub fn as_bytes(&self) -> &'b [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§
Source§impl<'b> Ord for RawString<'b>
impl<'b> Ord for RawString<'b>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'b> PartialOrd for RawString<'b>
impl<'b> PartialOrd for RawString<'b>
impl<'b> Copy for RawString<'b>
impl<'b> Eq for RawString<'b>
impl<'b> StructuralPartialEq for RawString<'b>
Auto Trait Implementations§
impl<'b> Freeze for RawString<'b>
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§
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