pub enum MessageFormatElement {
Literal(LiteralElement),
Argument(ArgumentElement),
Number(SimpleFormatElement<NumberSkeletonOrStyle>),
Date(SimpleFormatElement<DateTimeSkeletonOrStyle>),
Time(SimpleFormatElement<DateTimeSkeletonOrStyle>),
Select(SelectElement),
Plural(PluralElement),
Pound(PoundElement),
Tag(TagElement),
}Expand description
Message format element (enum of all possible elements)
Variants§
Literal(LiteralElement)
Argument(ArgumentElement)
Number(SimpleFormatElement<NumberSkeletonOrStyle>)
Date(SimpleFormatElement<DateTimeSkeletonOrStyle>)
Time(SimpleFormatElement<DateTimeSkeletonOrStyle>)
Select(SelectElement)
Plural(PluralElement)
Pound(PoundElement)
Tag(TagElement)
Implementations§
Source§impl MessageFormatElement
impl MessageFormatElement
pub fn element_type(&self) -> Type
pub fn is_literal(&self) -> bool
pub fn is_argument(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_date(&self) -> bool
pub fn is_time(&self) -> bool
pub fn is_select(&self) -> bool
pub fn is_plural(&self) -> bool
pub fn is_pound(&self) -> bool
pub fn is_tag(&self) -> bool
Source§impl MessageFormatElement
impl MessageFormatElement
pub fn literal(value: String) -> MessageFormatElement
pub fn argument(value: String) -> MessageFormatElement
Trait Implementations§
Source§impl Clone for MessageFormatElement
impl Clone for MessageFormatElement
Source§fn clone(&self) -> MessageFormatElement
fn clone(&self) -> MessageFormatElement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MessageFormatElement
impl Debug for MessageFormatElement
Source§impl<'de> Deserialize<'de> for MessageFormatElement
impl<'de> Deserialize<'de> for MessageFormatElement
Source§fn deserialize<D>(
deserializer: D,
) -> Result<MessageFormatElement, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MessageFormatElement, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MessageFormatElement
impl PartialEq for MessageFormatElement
Source§impl Serialize for MessageFormatElement
impl Serialize for MessageFormatElement
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
impl StructuralPartialEq for MessageFormatElement
Auto Trait Implementations§
impl Freeze for MessageFormatElement
impl RefUnwindSafe for MessageFormatElement
impl Send for MessageFormatElement
impl Sync for MessageFormatElement
impl Unpin for MessageFormatElement
impl UnsafeUnpin for MessageFormatElement
impl UnwindSafe for MessageFormatElement
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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