Enum fluent_bundle::types::FluentValue [−][src]
pub enum FluentValue<'source> {
String(Cow<'source, str>),
Number(FluentNumber),
Custom(Box<dyn FluentType + Send>),
None,
Error,
}The FluentValue enum represents values which can be formatted to a String.
Those values are either passed as arguments to FluentBundle::format_pattern or
produced by functions, or generated in the process of pattern resolution.
Variants
Number(FluentNumber)Custom(Box<dyn FluentType + Send>)Implementations
impl<'source> FluentValue<'source>[src]
impl<'source> FluentValue<'source>[src]pub fn try_number<S: ToString>(v: S) -> Self[src]
pub fn matches<R: Borrow<FluentResource>, M>(
&self,
other: &FluentValue<'_>,
scope: &Scope<'_, '_, R, M>
) -> bool where
M: MemoizerKind, [src]
&self,
other: &FluentValue<'_>,
scope: &Scope<'_, '_, R, M>
) -> bool where
M: MemoizerKind,
pub fn write<W, R, M>(&self, w: &mut W, scope: &Scope<'_, '_, R, M>) -> Result where
W: Write,
R: Borrow<FluentResource>,
M: MemoizerKind, [src]
W: Write,
R: Borrow<FluentResource>,
M: MemoizerKind,
pub fn as_string<R: Borrow<FluentResource>, M>(
&self,
scope: &Scope<'_, '_, R, M>
) -> Cow<'source, str> where
M: MemoizerKind, [src]
&self,
scope: &Scope<'_, '_, R, M>
) -> Cow<'source, str> where
M: MemoizerKind,
Trait Implementations
impl<'s> Clone for FluentValue<'s>[src]
impl<'s> Clone for FluentValue<'s>[src]fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'source> Debug for FluentValue<'source>[src]
impl<'source> Debug for FluentValue<'source>[src]impl<'source> From<Cow<'source, str>> for FluentValue<'source>[src]
impl<'source> From<Cow<'source, str>> for FluentValue<'source>[src]impl<'l> From<FluentNumber> for FluentValue<'l>[src]
impl<'l> From<FluentNumber> for FluentValue<'l>[src]fn from(input: FluentNumber) -> Self[src]
Auto Trait Implementations
impl<'source> !RefUnwindSafe for FluentValue<'source>
impl<'source> !RefUnwindSafe for FluentValue<'source>impl<'source> Send for FluentValue<'source>
impl<'source> Send for FluentValue<'source>impl<'source> !Sync for FluentValue<'source>
impl<'source> !Sync for FluentValue<'source>impl<'source> Unpin for FluentValue<'source>
impl<'source> Unpin for FluentValue<'source>impl<'source> !UnwindSafe for FluentValue<'source>
impl<'source> !UnwindSafe for FluentValue<'source>