[][src]Struct pelite::util::StringN

#[repr(transparent)]
pub struct StringN<A>(pub A);

Represents a fixed size string buffer.

The string is terminated by the first nul character or the end of the buffer otherwise.

Methods

impl<A: Pod> StringN<A>[src]

pub fn to_byte_str(&self) -> &[u8][src]

Gets the byte string.

Includes all bytes up to the first nul character or the whole buffer otherwise.

pub fn to_str(&self) -> Result<&str, Utf8Error>[src]

Gets the string.

Wraps to_byte_str and converts to str.

Trait Implementations

impl<A: Pod> Pod for StringN<A>[src]

impl<A> AsRef<A> for StringN<A>[src]

impl<A: Eq> Eq for StringN<A>[src]

impl<A: Clone> Clone for StringN<A>[src]

impl<A> AsMut<A> for StringN<A>[src]

impl<A: PartialEq> PartialEq<StringN<A>> for StringN<A>[src]

impl<A: PartialEq> PartialEq<A> for StringN<A>[src]

impl<A: Pod> PartialEq<[u8]> for StringN<A>[src]

impl<A: Pod> PartialEq<str> for StringN<A>[src]

impl<A> From<A> for StringN<A>[src]

impl<A: Copy> Copy for StringN<A>[src]

impl<A: Pod> Debug for StringN<A>[src]

impl<A: Pod> Display for StringN<A>[src]

impl<A: Pod> Serialize for StringN<A>[src]

Auto Trait Implementations

impl<A> Sync for StringN<A> where
    A: Sync

impl<A> Send for StringN<A> where
    A: Send

impl<A> Unpin for StringN<A> where
    A: Unpin

impl<A> UnwindSafe for StringN<A> where
    A: UnwindSafe

impl<A> RefUnwindSafe for StringN<A> where
    A: RefUnwindSafe

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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