Struct avr_progmem::string::LoadedString
source · [−]#[non_exhaustive]pub struct LoadedString<const N: usize> { /* private fields */ }
Expand description
A string stored as byte array.
This type is a simple wrapper around a byte array [u8;N]
and therefore,
is stored as such.
However, this type primarily is created from &str
and derefs to &str
,
thus it can be used similar to String
except that it is not mutable.
This type is particularly useful to store string literals in progmem.
Safety
The wrapped byte array must contain valid UTF-8.
Implementations
sourceimpl<const N: usize> LoadedString<N>
impl<const N: usize> LoadedString<N>
Trait Implementations
sourceimpl<const N: usize> Clone for LoadedString<N>
impl<const N: usize> Clone for LoadedString<N>
sourcefn clone(&self) -> LoadedString<N>
fn clone(&self) -> LoadedString<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<const N: usize> Debug for LoadedString<N>
impl<const N: usize> Debug for LoadedString<N>
sourceimpl<const N: usize> Deref for LoadedString<N>
impl<const N: usize> Deref for LoadedString<N>
sourceimpl<const N: usize> Display for LoadedString<N>
impl<const N: usize> Display for LoadedString<N>
sourceimpl<const N: usize> Hash for LoadedString<N>
impl<const N: usize> Hash for LoadedString<N>
sourceimpl<const N: usize> Ord for LoadedString<N>
impl<const N: usize> Ord for LoadedString<N>
sourceimpl<const N: usize> PartialEq<LoadedString<N>> for LoadedString<N>
impl<const N: usize> PartialEq<LoadedString<N>> for LoadedString<N>
sourcefn eq(&self, other: &LoadedString<N>) -> bool
fn eq(&self, other: &LoadedString<N>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LoadedString<N>) -> bool
fn ne(&self, other: &LoadedString<N>) -> bool
This method tests for !=
.
sourceimpl<const N: usize> PartialOrd<LoadedString<N>> for LoadedString<N>
impl<const N: usize> PartialOrd<LoadedString<N>> for LoadedString<N>
sourcefn partial_cmp(&self, other: &LoadedString<N>) -> Option<Ordering>
fn partial_cmp(&self, other: &LoadedString<N>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<const N: usize> TryFrom<&'_ str> for LoadedString<N>
impl<const N: usize> TryFrom<&'_ str> for LoadedString<N>
sourceimpl<const N: usize> uDisplay for LoadedString<N>
This is supported on crate feature ufmt
only.
impl<const N: usize> uDisplay for LoadedString<N>
ufmt
only.impl<const N: usize> Copy for LoadedString<N>
impl<const N: usize> Eq for LoadedString<N>
impl<const N: usize> StructuralEq for LoadedString<N>
impl<const N: usize> StructuralPartialEq for LoadedString<N>
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for LoadedString<N>
impl<const N: usize> Send for LoadedString<N>
impl<const N: usize> Sync for LoadedString<N>
impl<const N: usize> Unpin for LoadedString<N>
impl<const N: usize> UnwindSafe for LoadedString<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more