pub enum DurationValue {
Number(Number),
FluentExpression(FluentExpression),
}Expand description
Variants§
Implementations§
Source§impl DurationValue
impl DurationValue
Sourcepub fn new_number<I: Into<Number>>(number: I) -> Self
pub fn new_number<I: Into<Number>>(number: I) -> Self
Creates a duration value from a number. Same as number.
Sourcepub fn fluent_expression(exp: FluentExpression) -> Self
pub fn fluent_expression(exp: FluentExpression) -> Self
Creates a duration value from a fluent expression.
Sourcepub fn new_f_exp(exp: FluentExpression) -> Self
pub fn new_f_exp(exp: FluentExpression) -> Self
Creates a duration value from a fluent expression. Same as fluent_expression.
Trait Implementations§
Source§impl Clone for DurationValue
impl Clone for DurationValue
Source§impl Debug for DurationValue
impl Debug for DurationValue
Source§impl<'de> Deserialize<'de> for DurationValue
Available on crate feature serde only.
impl<'de> Deserialize<'de> for DurationValue
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<FluentExpression> for DurationValue
impl From<FluentExpression> for DurationValue
Source§fn from(value: FluentExpression) -> Self
fn from(value: FluentExpression) -> Self
Converts to this type from the input type.
Source§impl From<Number> for DurationValue
impl From<Number> for DurationValue
Source§impl Parser for DurationValue
Available on crate feature parser only.
impl Parser for DurationValue
Available on crate feature
parser only.Source§type Item = DurationValue
type Item = DurationValue
The parsed value;
Self except for
DurationConstraint, which may be empty.Source§impl PartialEq for DurationValue
impl PartialEq for DurationValue
Source§impl Serialize for DurationValue
Available on crate feature serde only.
impl Serialize for DurationValue
Available on crate feature
serde only.impl StructuralPartialEq for DurationValue
Source§impl Visitor<DurationValue, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<DurationValue, RcDoc<'static>> for PrettyRenderer
Available on crate feature
pretty only.Source§fn visit(&self, value: &DurationValue) -> RcDoc<'static>
fn visit(&self, value: &DurationValue) -> RcDoc<'static>
Visits
value and returns the result.Auto Trait Implementations§
impl Forget for DurationValue
impl Freeze for DurationValue
impl Move for DurationValue
impl RefUnwindSafe for DurationValue
impl Send for DurationValue
impl Sync for DurationValue
impl Unpin for DurationValue
impl UnsafeUnpin for DurationValue
impl UnwindSafe for DurationValue
Blanket Implementations§
Source§impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
Source§fn accept_mut(&self, v: &mut V) -> O
fn accept_mut(&self, v: &mut V) -> O
Lets the mutable visitor
v visit self.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>,
Source§impl<T> Pretty for Twhere
T: PrettyVisit,
impl<T> Pretty for Twhere
T: PrettyVisit,
Source§impl<T> PrettyVisit for T
impl<T> PrettyVisit for T
Source§fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
Available on crate feature
pretty only.Builds the document for
self with the renderer r.