Trait Notify

Source
pub trait Notify {
    // Provided methods
    fn last_tx_did_drop_pinned(self: Pin<&Self>) { ... }
    fn last_tx_did_drop(&self) { ... }
    fn last_rx_did_drop_pinned(self: Pin<&Self>) { ... }
    fn last_rx_did_drop(&self) { ... }
}
Expand description

Allows the reference-counted object to know when the last write reference or the last read reference is dropped.

Exactly one of these functions will be called.

Provided Methods§

Source

fn last_tx_did_drop_pinned(self: Pin<&Self>)

Called when the last Tx is dropped. By default, delegates to Notify::last_tx_did_drop.

Source

fn last_tx_did_drop(&self)

Called when the last Tx is dropped.

WARNING: This function is called during a Drop::drop implementation. To avoid deadlock, ensure that it does not acquire a lock that may be held during unwinding.

NOTE: Only called if there are live Rx references.

Source

fn last_rx_did_drop_pinned(self: Pin<&Self>)

Called when the last Rx is dropped. By default, delegates to Notify::last_rx_did_drop.

Source

fn last_rx_did_drop(&self)

Called when the last Rx is dropped.

WARNING: This function is called during a Drop::drop implementation. To avoid deadlock, ensure that it does not acquire a lock that may be held during unwinding.

NOTE: Only called if there are live Tx references.

Implementors§