Struct carapax::types::TextEntities
source · pub struct TextEntities { /* private fields */ }
Expand description
Represents a collection of text entities.
Implementations§
source§impl TextEntities
impl TextEntities
sourcepub fn push(&mut self, value: TextEntity)
pub fn push(&mut self, value: TextEntity)
sourcepub fn serialize(&self) -> Result<String, TextEntityError>
pub fn serialize(&self) -> Result<String, TextEntityError>
Serializes text entities into a JSON string.
Trait Implementations§
source§impl Clone for TextEntities
impl Clone for TextEntities
source§fn clone(&self) -> TextEntities
fn clone(&self) -> TextEntities
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TextEntities
impl Debug for TextEntities
source§impl<'de> Deserialize<'de> for TextEntities
impl<'de> Deserialize<'de> for TextEntities
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TextEntities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TextEntities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromIterator<TextEntity> for TextEntities
impl FromIterator<TextEntity> for TextEntities
source§fn from_iter<T>(iter: T) -> TextEntitieswhere
T: IntoIterator<Item = TextEntity>,
fn from_iter<T>(iter: T) -> TextEntitieswhere
T: IntoIterator<Item = TextEntity>,
Creates a value from an iterator. Read more
source§impl Index<usize> for TextEntities
impl Index<usize> for TextEntities
source§impl IndexMut<usize> for TextEntities
impl IndexMut<usize> for TextEntities
source§impl<'a> IntoIterator for &'a TextEntities
impl<'a> IntoIterator for &'a TextEntities
§type Item = &'a TextEntity
type Item = &'a TextEntity
The type of the elements being iterated over.
§type IntoIter = Iter<'a, TextEntity>
type IntoIter = Iter<'a, TextEntity>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <&'a TextEntities as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a TextEntities as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl<'a> IntoIterator for &'a mut TextEntities
impl<'a> IntoIterator for &'a mut TextEntities
§type Item = &'a mut TextEntity
type Item = &'a mut TextEntity
The type of the elements being iterated over.
§type IntoIter = IterMut<'a, TextEntity>
type IntoIter = IterMut<'a, TextEntity>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <&'a mut TextEntities as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut TextEntities as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl IntoIterator for TextEntities
impl IntoIterator for TextEntities
§type Item = TextEntity
type Item = TextEntity
The type of the elements being iterated over.
§type IntoIter = IntoIter<<TextEntities as IntoIterator>::Item>
type IntoIter = IntoIter<<TextEntities as IntoIterator>::Item>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <TextEntities as IntoIterator>::IntoIter
fn into_iter(self) -> <TextEntities as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl PartialEq for TextEntities
impl PartialEq for TextEntities
source§fn eq(&self, other: &TextEntities) -> bool
fn eq(&self, other: &TextEntities) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TextEntities
impl PartialOrd for TextEntities
source§fn partial_cmp(&self, other: &TextEntities) -> Option<Ordering>
fn partial_cmp(&self, other: &TextEntities) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl Serialize for TextEntities
impl Serialize for TextEntities
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<Vec<RawTextEntity>> for TextEntities
impl TryFrom<Vec<RawTextEntity>> for TextEntities
§type Error = TextEntityError
type Error = TextEntityError
The type returned in the event of a conversion error.
source§fn try_from(
entities: Vec<RawTextEntity>
) -> Result<TextEntities, <TextEntities as TryFrom<Vec<RawTextEntity>>>::Error>
fn try_from( entities: Vec<RawTextEntity> ) -> Result<TextEntities, <TextEntities as TryFrom<Vec<RawTextEntity>>>::Error>
Performs the conversion.
impl StructuralPartialEq for TextEntities
Auto Trait Implementations§
impl Freeze for TextEntities
impl RefUnwindSafe for TextEntities
impl Send for TextEntities
impl Sync for TextEntities
impl Unpin for TextEntities
impl UnwindSafe for TextEntities
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more