Struct rphtml::entity::EncodedData

source ·
pub struct EncodedData<'b> { /* private fields */ }
Expand description

EncodedData, impl the ICodedDataTrait and IBytesTrait and IntoIterator.

Implementations§

source§

impl<'b> EncodedData<'b>

source

pub fn entity_count(&self) -> usize

source

pub fn to_owned(&mut self)

source

pub fn into_bytes(self) -> Vec<u8>

source

pub fn bytes(&self) -> Cow<'_, [u8]>

Trait Implementations§

source§

impl<'b> Debug for EncodedData<'b>

source§

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

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

impl<'b> From<&EncodedData<'b>> for Result<String, Error>

source§

fn from(value: &EncodedData<'b>) -> Result<String, Error>

Converts to this type from the input type.
source§

impl<'b> From<&EncodedData<'b>> for Result<Vec<char>, Error>

source§

fn from(value: &EncodedData<'b>) -> Result<Vec<char>, Error>

Converts to this type from the input type.
source§

impl<'b> From<&EncodedData<'b>> for Vec<u8>

source§

fn from(value: &EncodedData<'b>) -> Vec<u8>

Converts to this type from the input type.
source§

impl<'b> From<EncodedData<'b>> for Result<String, Error>

source§

fn from(value: EncodedData<'b>) -> Result<String, Error>

Converts to this type from the input type.
source§

impl<'b> From<EncodedData<'b>> for Result<Vec<char>, Error>

source§

fn from(value: EncodedData<'b>) -> Result<Vec<char>, Error>

Converts to this type from the input type.
source§

impl<'b> From<EncodedData<'b>> for Vec<u8>

source§

fn from(value: EncodedData<'b>) -> Vec<u8>

Converts to this type from the input type.
source§

impl<'b> IBytesTrait for EncodedData<'b>

source§

fn byte(&self, index: usize) -> Option<&u8>

source§

fn bytes_len(&self) -> usize

source§

impl<'b> ICodedDataTrait for EncodedData<'b>

source§

impl<'a> IntoIterator for &'a EncodedData<'a>

§

type Item = (&'a u8, Option<(usize, usize)>)

The type of the elements being iterated over.
§

type IntoIter = DataIter<'a, CharEntity>

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

fn into_iter(self) -> <&'a EncodedData<'a> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<'b> Freeze for EncodedData<'b>

§

impl<'b> RefUnwindSafe for EncodedData<'b>

§

impl<'b> Send for EncodedData<'b>

§

impl<'b> Sync for EncodedData<'b>

§

impl<'b> Unpin for EncodedData<'b>

§

impl<'b> UnwindSafe for EncodedData<'b>

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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.