Skip to main content

receiver_borrow

Function receiver_borrow 

Source
pub(crate) fn receiver_borrow(
    cell: &Ident,
    guard: &Ident,
    self_ref: &Ident,
    mutable: bool,
) -> TokenStream
Expand description

Borrow a shim’s receiver from its RefCell for the rest of the shim: shared for &self, exclusive for &mut self. A call still running on the same object makes this raise the miniextendr_borrow_conflict error.