[−][src]Struct pelite::util::StringN
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]
fn zeroed() -> Self where
Self: Sized,
[src]
Self: Sized,
unsafe fn uninit() -> Self where
Self: Sized,
[src]
Self: Sized,
fn as_bytes(&self) -> &[u8]
[src]
fn as_bytes_mut(&mut self) -> &mut [u8]
[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,
A: Sync,
impl<A> Send for StringN<A> where
A: Send,
A: Send,
impl<A> Unpin for StringN<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for StringN<A> where
A: UnwindSafe,
A: UnwindSafe,
impl<A> RefUnwindSafe for StringN<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,