[−][src]Struct pdb::RawString
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]
impl<'b> RawString<'b>
pub fn as_bytes(&self) -> &'b [u8]
[src]
pub fn as_bytes(&self) -> &'b [u8]
Return the raw bytes of this string, as found in the PDB file.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Return the length of this string in bytes.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns a boolean indicating if this string is empty.
pub fn to_string(&self) -> Cow<'b, str>
[src]
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
impl<'b> Clone for RawString<'b>
[src]
impl<'b> Clone for RawString<'b>
fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'b> PartialEq for RawString<'b>
[src]
impl<'b> PartialEq for RawString<'b>
fn eq(&self, other: &RawString<'b>) -> bool
[src]
fn eq(&self, other: &RawString<'b>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RawString<'b>) -> bool
[src]
fn ne(&self, other: &RawString<'b>) -> bool
This method tests for !=
.
impl<'b> Eq for RawString<'b>
[src]
impl<'b> Eq for RawString<'b>
impl<'b> Hash for RawString<'b>
[src]
impl<'b> Hash for RawString<'b>
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'b> PartialOrd for RawString<'b>
[src]
impl<'b> PartialOrd for RawString<'b>
fn partial_cmp(&self, other: &RawString<'b>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RawString<'b>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &RawString<'b>) -> bool
[src]
fn lt(&self, other: &RawString<'b>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &RawString<'b>) -> bool
[src]
fn le(&self, other: &RawString<'b>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &RawString<'b>) -> bool
[src]
fn gt(&self, other: &RawString<'b>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &RawString<'b>) -> bool
[src]
fn ge(&self, other: &RawString<'b>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'b> Ord for RawString<'b>
[src]
impl<'b> Ord for RawString<'b>
fn cmp(&self, other: &RawString<'b>) -> Ordering
[src]
fn cmp(&self, other: &RawString<'b>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<'b> Debug for RawString<'b>
[src]
impl<'b> Debug for RawString<'b>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'b> Display for RawString<'b>
[src]
impl<'b> Display for RawString<'b>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'b> From<RawString<'b>> for &'b [u8]
[src]
impl<'b> From<RawString<'b>> for &'b [u8]
impl<'b> From<&'b str> for RawString<'b>
[src]
impl<'b> From<&'b str> for RawString<'b>
impl<'b> From<&'b [u8]> for RawString<'b>
[src]
impl<'b> From<&'b [u8]> for RawString<'b>