pub struct OrderRefMut<'a>(/* private fields */);Expand description
Lifetime-scoped exclusive write borrow of a cached order.
Returned by crate::cache::Cache::order_mut. While the borrow is alive, no other read or
write on the same cell is permitted (enforced at runtime by the underlying RefMut).
Drop the borrow before dispatching events or taking any other cache borrow that may re-enter
the same order.
Implementations§
Methods from Deref<Target = OrderAny>§
Sourcepub fn init_event(&self) -> &OrderInitialized
pub fn init_event(&self) -> &OrderInitialized
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).
pub fn set_order_list_id(&mut self, id: OrderListId)
Trait Implementations§
Source§impl AsMut<OrderAny> for OrderRefMut<'_>
impl AsMut<OrderAny> for OrderRefMut<'_>
Source§impl AsRef<OrderAny> for OrderRefMut<'_>
impl AsRef<OrderAny> for OrderRefMut<'_>
Source§impl Debug for OrderRefMut<'_>
impl Debug for OrderRefMut<'_>
Source§impl Deref for OrderRefMut<'_>
impl Deref for OrderRefMut<'_>
Source§impl DerefMut for OrderRefMut<'_>
impl DerefMut for OrderRefMut<'_>
Source§impl Display for OrderRefMut<'_>
impl Display for OrderRefMut<'_>
Source§impl PartialEq<&OrderAny> for OrderRefMut<'_>
impl PartialEq<&OrderAny> for OrderRefMut<'_>
Source§impl PartialEq<OrderAny> for OrderRefMut<'_>
impl PartialEq<OrderAny> for OrderRefMut<'_>
Auto Trait Implementations§
impl<'a> Freeze for OrderRefMut<'a>
impl<'a> !RefUnwindSafe for OrderRefMut<'a>
impl<'a> !Send for OrderRefMut<'a>
impl<'a> !Sync for OrderRefMut<'a>
impl<'a> Unpin for OrderRefMut<'a>
impl<'a> UnsafeUnpin for OrderRefMut<'a>
impl<'a> !UnwindSafe for OrderRefMut<'a>
Blanket Implementations§
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more