[−][src]Enum fluent_bundle::types::FluentValue
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]
pub fn try_number<S: ToString>(v: S) -> Self
[src]
pub fn matches<R: Borrow<FluentResource>, M: MemoizerKind>(
&self,
other: &FluentValue<'_>,
scope: &Scope<'_, '_, R, M>
) -> bool
[src]
&self,
other: &FluentValue<'_>,
scope: &Scope<'_, '_, R, M>
) -> bool
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: MemoizerKind>(
&self,
scope: &Scope<'_, '_, R, M>
) -> Cow<'source, str>
[src]
&self,
scope: &Scope<'_, '_, R, M>
) -> Cow<'source, str>
Trait Implementations
impl<'s> Clone for FluentValue<'s>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'source> Debug for FluentValue<'source>
[src]
impl<'_, '_> From<&'_ f32> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ f64> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i128> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i16> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i32> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i64> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i8> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ isize> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u128> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u16> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u32> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u64> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u8> for FluentValue<'_>
[src]
impl<'_, '_> From<&'_ usize> for FluentValue<'_>
[src]
impl<'source> From<&'source str> for FluentValue<'source>
[src]
impl<'source> From<Cow<'source, str>> for FluentValue<'source>
[src]
impl<'l> From<FluentNumber> for FluentValue<'l>
[src]
fn from(input: FluentNumber) -> Self
[src]
impl<'source> From<String> for FluentValue<'source>
[src]
impl<'_> From<f32> for FluentValue<'_>
[src]
impl<'_> From<f64> for FluentValue<'_>
[src]
impl<'_> From<i128> for FluentValue<'_>
[src]
impl<'_> From<i16> for FluentValue<'_>
[src]
impl<'_> From<i32> for FluentValue<'_>
[src]
impl<'_> From<i64> for FluentValue<'_>
[src]
impl<'_> From<i8> for FluentValue<'_>
[src]
impl<'_> From<isize> for FluentValue<'_>
[src]
impl<'_> From<u128> for FluentValue<'_>
[src]
impl<'_> From<u16> for FluentValue<'_>
[src]
impl<'_> From<u32> for FluentValue<'_>
[src]
impl<'_> From<u64> for FluentValue<'_>
[src]
impl<'_> From<u8> for FluentValue<'_>
[src]
impl<'_> From<usize> for FluentValue<'_>
[src]
impl<'s> PartialEq<FluentValue<'s>> for FluentValue<'s>
[src]
Auto Trait Implementations
impl<'source> !RefUnwindSafe for FluentValue<'source>
impl<'source> Send for FluentValue<'source>
impl<'source> !Sync for FluentValue<'source>
impl<'source> Unpin for FluentValue<'source>
impl<'source> !UnwindSafe for FluentValue<'source>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
pub fn equals(&Self, &(dyn Any + 'static)) -> bool
[src]
pub fn as_any(&Self) -> &(dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,