pub struct AddressSink<A: Actor, Rc: RefCounter = Strong> { /* private fields */ }
Expand description

An AddressSink is the futures Sink returned by Address::into_sink. Similarly to with addresses, the strong variety of AddressSink will prevent the actor from being dropped, whereas the weak variety will not.

Implementations

Returns whether the actor referred to by this address sink is running and accepting messages.

Create a weak address sink. Unlike with the strong variety of address sink (this kind), an actor will not be prevented from being dropped if only weak sinks, channels, and addresses exist.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

Returns whether the actor referred to by this message sink is running and accepting messages.

Clones this message sink as a boxed trait object.

The type of value produced by the sink when an error occurs.

Attempts to prepare the Sink to receive a value. Read more

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more

Flush any remaining output from this sink. Read more

Flush any remaining output and close this sink, if necessary. Read more

Create a weak message sink. Unlike with the strong variety of message sink (this kind), an actor will not be prevented from being dropped if only weak sinks, channels, and addresses exist. Read more

Upcasts this strong message sink into a boxed generic MessageSink trait object Read more

Upcasts this strong message sink into a reference to the generic MessageSink trait object Read more

Clones this message sink as a boxed trait object.

Upcasts this weak message sink into a boxed generic MessageSink trait object Read more

Upcasts this weak message sink into a reference to the generic MessageSink trait object Read more

Clones this message sink as a boxed trait object.

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.

Composes a function in front of the sink. Read more

Composes a function in front of the sink. Read more

Transforms the error returned by the sink.

Map this sink’s error to a different error type using the Into trait. Read more

Adds a fixed-size buffer to the current sink. Read more

Close the sink.

Fanout items to multiple sinks. Read more

Flush the sink, processing all pending items. Read more

A future that completes after the given item has been fully processed into the sink, including flushing. Read more

A future that completes after the given item has been received by the sink. Read more

A future that completes after the given stream has been fully processed into the sink, including flushing. Read more

Wrap this sink in an Either sink, making it the left-hand variant of that Either. Read more

Wrap this stream in an Either stream, making it the right-hand variant of that Either. Read more

A convenience method for calling Sink::poll_ready on Unpin sink types. Read more

A convenience method for calling Sink::start_send on Unpin sink types. Read more

A convenience method for calling Sink::poll_flush on Unpin sink types. Read more

A convenience method for calling Sink::poll_close on Unpin sink types. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. 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.