[][src]Struct mozpdb::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]

pub fn as_bytes(&self) -> &'b [u8][src]

Return the raw bytes of this string, as found in the PDB file.

pub fn len(&self) -> usize[src]

Return the length of this string in bytes.

pub fn is_empty(&self) -> bool[src]

Returns a boolean indicating if this string is empty.

pub fn to_string(&self) -> Cow<'b, str>[src]

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> From<RawString<'b>> for &'b [u8][src]

impl<'b> From<&'b str> for RawString<'b>[src]

impl<'b> From<&'b [u8]> for RawString<'b>[src]

impl<'b> Clone for RawString<'b>[src]

impl<'b> Eq for RawString<'b>[src]

impl<'b> Ord for RawString<'b>[src]

impl<'b> PartialEq<RawString<'b>> for RawString<'b>[src]

impl<'b> PartialOrd<RawString<'b>> for RawString<'b>[src]

impl<'b> Display for RawString<'b>[src]

impl<'b> Debug for RawString<'b>[src]

impl<'b> Hash for RawString<'b>[src]

Auto Trait Implementations

impl<'b> Send for RawString<'b>

impl<'b> Sync for RawString<'b>

impl<'b> Unpin for RawString<'b>

impl<'b> UnwindSafe for RawString<'b>

impl<'b> RefUnwindSafe for RawString<'b>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]