pub struct DropNotifyWatchSender<T: Default>(_);
Expand description

Wrapper for postage::watch::Sender that sends Default when dropped

Derefs to the inner Sender.

Ideally this would be behaviour promised by upstream, or something See https://github.com/austinjones/postage-rs/issues/57.

Implementations

Arrange to send T::Default when inner is dropped

Unwrap the inner sender, defusing the drop notification

Methods from Deref<Target = Sender<T>>

Mutably borrows the contained value, blocking the channel while the borrow is held.

After the borrow is released, receivers will be notified of a new value.

Creates a new Receiver that listens to this channel.

Immutably borrows the contained value, blocking the channel while the borrow is held.

Trait Implementations

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.