pub struct MetricSpec { /* private fields */ }Expand description
Implementations§
Source§impl MetricSpec
impl MetricSpec
Sourcepub const fn new(
optimization: Optimization,
exp: MetricFluentExpression,
) -> Self
pub const fn new( optimization: Optimization, exp: MetricFluentExpression, ) -> Self
Creates a new metric specification, (:metric <optimization> <metric-f-exp>).
Sourcepub const fn optimization(&self) -> Optimization
pub const fn optimization(&self) -> Optimization
Gets the optimization instruction.
Sourcepub const fn expression(&self) -> &MetricFluentExpression
pub const fn expression(&self) -> &MetricFluentExpression
Gets the expression to optimize.
Trait Implementations§
Source§impl Clone for MetricSpec
impl Clone for MetricSpec
Source§impl Debug for MetricSpec
impl Debug for MetricSpec
Source§impl<'de> Deserialize<'de> for MetricSpec
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MetricSpec
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 Parser for MetricSpec
Available on crate feature parser only.
impl Parser for MetricSpec
Available on crate feature
parser only.Source§type Item = MetricSpec
type Item = MetricSpec
The parsed value;
Self except for
DurationConstraint, which may be empty.Source§impl PartialEq for MetricSpec
impl PartialEq for MetricSpec
Source§impl Serialize for MetricSpec
Available on crate feature serde only.
impl Serialize for MetricSpec
Available on crate feature
serde only.impl StructuralPartialEq for MetricSpec
Source§impl Visitor<MetricSpec, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<MetricSpec, RcDoc<'static>> for PrettyRenderer
Available on crate feature
pretty only.Source§fn visit(&self, value: &MetricSpec) -> RcDoc<'static>
fn visit(&self, value: &MetricSpec) -> RcDoc<'static>
Visits
value and returns the result.Auto Trait Implementations§
impl Forget for MetricSpec
impl Freeze for MetricSpec
impl Move for MetricSpec
impl RefUnwindSafe for MetricSpec
impl Send for MetricSpec
impl Sync for MetricSpec
impl Unpin for MetricSpec
impl UnsafeUnpin for MetricSpec
impl UnwindSafe for MetricSpec
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.