[−][src]Enum fluent::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 + 'static + Send>)
Implementations
impl<'source> FluentValue<'source>
[src]
pub fn try_number<S>(v: S) -> FluentValue<'source> where
S: ToString,
[src]
S: ToString,
pub fn matches<R, M>(
&self,
other: &FluentValue<'_>,
scope: &Scope<'_, '_, R, M>
) -> bool where
M: MemoizerKind,
R: Borrow<FluentResource>,
[src]
&self,
other: &FluentValue<'_>,
scope: &Scope<'_, '_, R, M>
) -> bool where
M: MemoizerKind,
R: Borrow<FluentResource>,
pub fn write<W, R, M>(
&self,
w: &mut W,
scope: &Scope<'_, '_, R, M>
) -> Result<(), Error> where
M: MemoizerKind,
R: Borrow<FluentResource>,
W: Write,
[src]
&self,
w: &mut W,
scope: &Scope<'_, '_, R, M>
) -> Result<(), Error> where
M: MemoizerKind,
R: Borrow<FluentResource>,
W: Write,
pub fn as_string<R, M>(&self, scope: &Scope<'_, '_, R, M>) -> Cow<'source, str> where
M: MemoizerKind,
R: Borrow<FluentResource>,
[src]
M: MemoizerKind,
R: Borrow<FluentResource>,
Trait Implementations
impl<'s> Clone for FluentValue<'s>
[src]
fn clone(&self) -> FluentValue<'s>
[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]
fn from(n: &f32) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ f64> for FluentValue<'_>
[src]
fn from(n: &f64) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i128> for FluentValue<'_>
[src]
fn from(n: &i128) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i16> for FluentValue<'_>
[src]
fn from(n: &i16) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i32> for FluentValue<'_>
[src]
fn from(n: &i32) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i64> for FluentValue<'_>
[src]
fn from(n: &i64) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ i8> for FluentValue<'_>
[src]
fn from(n: &i8) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ isize> for FluentValue<'_>
[src]
fn from(n: &isize) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u128> for FluentValue<'_>
[src]
fn from(n: &u128) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u16> for FluentValue<'_>
[src]
fn from(n: &u16) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u32> for FluentValue<'_>
[src]
fn from(n: &u32) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u64> for FluentValue<'_>
[src]
fn from(n: &u64) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ u8> for FluentValue<'_>
[src]
fn from(n: &u8) -> FluentValue<'_>
[src]
impl<'_, '_> From<&'_ usize> for FluentValue<'_>
[src]
fn from(n: &usize) -> FluentValue<'_>
[src]
impl<'source> From<&'source str> for FluentValue<'source>
[src]
fn from(s: &'source str) -> FluentValue<'source>
[src]
impl<'source> From<Cow<'source, str>> for FluentValue<'source>
[src]
fn from(s: Cow<'source, str>) -> FluentValue<'source>
[src]
impl<'l> From<FluentNumber> for FluentValue<'l>
[src]
fn from(input: FluentNumber) -> FluentValue<'l>
[src]
impl<'source> From<String> for FluentValue<'source>
[src]
fn from(s: String) -> FluentValue<'source>
[src]
impl<'_> From<f32> for FluentValue<'_>
[src]
fn from(n: f32) -> FluentValue<'_>
[src]
impl<'_> From<f64> for FluentValue<'_>
[src]
fn from(n: f64) -> FluentValue<'_>
[src]
impl<'_> From<i128> for FluentValue<'_>
[src]
fn from(n: i128) -> FluentValue<'_>
[src]
impl<'_> From<i16> for FluentValue<'_>
[src]
fn from(n: i16) -> FluentValue<'_>
[src]
impl<'_> From<i32> for FluentValue<'_>
[src]
fn from(n: i32) -> FluentValue<'_>
[src]
impl<'_> From<i64> for FluentValue<'_>
[src]
fn from(n: i64) -> FluentValue<'_>
[src]
impl<'_> From<i8> for FluentValue<'_>
[src]
fn from(n: i8) -> FluentValue<'_>
[src]
impl<'_> From<isize> for FluentValue<'_>
[src]
fn from(n: isize) -> FluentValue<'_>
[src]
impl<'_> From<u128> for FluentValue<'_>
[src]
fn from(n: u128) -> FluentValue<'_>
[src]
impl<'_> From<u16> for FluentValue<'_>
[src]
fn from(n: u16) -> FluentValue<'_>
[src]
impl<'_> From<u32> for FluentValue<'_>
[src]
fn from(n: u32) -> FluentValue<'_>
[src]
impl<'_> From<u64> for FluentValue<'_>
[src]
fn from(n: u64) -> FluentValue<'_>
[src]
impl<'_> From<u8> for FluentValue<'_>
[src]
fn from(n: u8) -> FluentValue<'_>
[src]
impl<'_> From<usize> for FluentValue<'_>
[src]
fn from(n: usize) -> 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,
fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,