Struct OrderRef Copy item path Source pub struct OrderRef<'a>();Expand description Lifetime-scoped read borrow of a cached order.
Returned by crate::cache::Cache::order . The borrow drops with the enclosing scope, which
makes any attempt to hold it across a cache mutation panic at runtime: a loud failure beats the
silent staleness that a stored clone would produce.
Method calls on the inner OrderAny resolve via Deref ; comparisons against &OrderAny
or owned OrderAny values are direct (order_ref == &order); Display and Debug forward
to the inner record. Use cloned when an owned snapshot is required (for
example, before crossing a boundary that may dispatch events).
Wraps the given Ref borrow.
Returns an owned snapshot of the borrowed order.
Mirrors Option::cloned and Iterator::cloned; the snapshot will not reflect later
mutations of the underlying cell.
Returns a reference to the crate::events::OrderInitialized event.
This is always the first event in the order’s event list (invariant).
§ Panics
Panics if the first event is not OrderInitialized (violates invariant).
Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter.
Read more The resulting type after dereferencing.
Dereferences the value.
Formats the value using the given formatter.
Read more Converts to this type from the input type.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
🔬 This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.