Struct EfiString

Source
pub struct EfiString(/* private fields */);
Expand description

An owned version of EfiStr. The string is always have NUL at the end.

Implementations§

Source§

impl EfiString

Source

pub fn push(&mut self, c: EfiChar)

Source

pub fn push_str<S: AsRef<str>>(&mut self, s: S) -> Result<(), EfiStringError>

Methods from Deref<Target = EfiStr>§

Source

pub const EMPTY: &'static Self

Source

pub fn as_ptr(&self) -> *const u16

Returnes a pointer to the first character.

Source

pub fn len(&self) -> usize

Returnes length of this string without NUL, in character.

Source

pub fn is_empty(&self) -> bool

Returns true if this string contains only NUL character.

Source

pub fn display(&self) -> impl Display + '_

Returns object that implement core::fmt::Display for safely printing string that may contain non-Unicode data.

Trait Implementations§

Source§

impl AsRef<EfiStr> for EfiString

Source§

fn as_ref(&self) -> &EfiStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<EfiStr> for EfiString

Source§

fn borrow(&self) -> &EfiStr

Immutably borrows from an owned value. Read more
Source§

impl Debug for EfiString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for EfiString

Source§

type Target = EfiStr

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl FromStr for EfiString

Source§

type Err = EfiStringError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<'a> IntoIterator for &'a mut EfiString

Source§

type Item = &'a mut EfiChar

The type of the elements being iterated over.
Source§

type IntoIter = IterMut<'a, EfiChar>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.