Struct pdb::RawString
[−]
[src]
pub struct RawString<'b>(_);
RawString
refers to a &[u8]
that physically resides somewhere inside a PDB data structure.
A RawString
may not be valid UTF-8.
Methods
impl<'b> RawString<'b>
[src]
fn as_bytes(&self) -> &'b [u8]
Return the raw bytes of this string, as found in the PDB file.
fn len(&self) -> usize
Return the length of this string in bytes.
fn is_empty(&self) -> bool
Returns a boolean indicating if this string is empty.
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
impl<'b> Clone for RawString<'b>
[src]
fn clone(&self) -> RawString<'b>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'b> PartialEq for RawString<'b>
[src]
fn eq(&self, __arg_0: &RawString<'b>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RawString<'b>) -> bool
This method tests for !=
.