pub struct Sender<T>(_);
Expand description

The transmission end of a bounded mpsc channel.

This value is created by the channel function.

Implementations§

Attempts to send a message on this Sender, returning the message if there was an error.

Send a message on the channel.

This function should only be called after poll_ready has reported that the channel is ready to receive a message.

Polls the channel to determine if there is guaranteed capacity to send at least one item without waiting.

Return value

This method returns:

  • Poll::Ready(Ok(_)) if there is sufficient capacity;
  • Poll::Pending if the channel may not have capacity, in which case the current task is queued to be notified once capacity is available;
  • Poll::Ready(Err(SendError)) if the receiver has been dropped.

Returns whether this channel is closed without needing a context.

Closes this channel from the sender side, preventing any new messages.

Disconnects this sender from the channel, closing it if there are no more senders left.

Returns whether the senders send to the same receiver.

Returns whether the sender send to this receiver.

Hashes the receiver into the provided hasher

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Forward a GhostEvent along this channel.
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

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
We need to store signed agent info.
We need to get previously stored agent info.
We need to get agents that fit into an arc set for gossip.
query agent info in order of closeness to a basis location.
Query the peer density of a space for a given [DhtArc].
A remote node is attempting to make a remote call on us.
A remote node is publishing data in a range we claim to be holding.
A remote node is requesting entry data from us.
A remote node is requesting metadata from us.
A remote node is requesting link data from us.
A remote node is requesting agent activity from us.
A remote node is requesting agent activity from us.
A remote node has sent us a validation receipt.
The p2p module wishes to query our DhtOpHash store. Gets all ops from a set of agents within a time window and max number of ops. Returns the actual time window of returned ops as well.
The p2p module needs access to the content for a given set of DhtOpHashes.
P2p operations require cryptographic signatures and validation.
Messages between agents that drive a countersigning session.
The p2p module must be informed at runtime which dna/agent pairs it should be tracking.
If a cell is disabled, we’ll need to "leave" the network module as well.
Invoke a zome function on a remote node (if you have been granted the capability).
Invoke a zome function on a remote node (if you have been granted the capability). This is a fire-and-forget operation, a best effort will be made to forward the signal, but if the conductor network is overworked it may decide not to deliver some of the signals.
Publish data to the correct neighborhood.
Publish a countersigning op.
Get an entry from the DHT.
Get metadata from the DHT.
Get links from the DHT.
Get agent activity from the DHT.
A remote node is requesting agent activity from us.
Send a validation receipt to a remote node.
New data has been integrated and is ready for gossiping.
Check if any local agent in this space is an authority for a hash.
Messages between agents negotiation a countersigning session.
Dump network metrics.
Get struct for diagnostic data
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

We need to store signed agent info.
We need to get previously stored agent info.
Query the peer density of a space for a given [DhtArc].
We are receiving a request from a remote node.
We are receiving a notification from a remote node.
We have received ops to be integrated, either through gossip or publish.
Gather a list of op-hashes from our implementor that meet criteria. Get the oldest and newest times for ops within a time window and max number of ops.
Gather all op-hash data for a list of op-hashes from our implementor.
Request that our implementor sign some data on behalf of an agent.
Get the calculated transport bindings.
Announce a space/agent pair on this network.
Withdraw this space/agent pair from this network.
Make a request of a single remote agent, expecting a response. The remote side will receive a “Call” event.
Make a request to multiple destination agents - awaiting/aggregating the responses. The remote sides will see these messages as “Call” events. NOTE: We’ve currently disabled the “multi” part of this. It will still pick appropriate peers by basis, but will only make requests one at a time, returning the first success.
Publish data to a “neighborhood” of remote nodes surrounding the “basis” hash. This is a multi-step fire-and-forget algorithm. An Ok(()) result only means that we were able to establish at least one connection with a node in the target neighborhood. The remote sides will see these messages as “Notify” events.
Broadcast data to a specific set of agents without expecting a response. An Ok(()) result only means that we were able to establish at least one connection with a node in the agent set.
New data has been integrated and is ready for gossiping.
Check if an agent is an authority for a hash.
dump network metrics
Get data for diagnostics
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type for metadata in pointers and references to Self.
Should always be Self
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.
A convenience method for calling Sink::start_send on Unpin sink types.
A convenience method for calling Sink::poll_flush on Unpin sink types.
A convenience method for calling Sink::poll_close on Unpin sink types.
Limits the rate at which items can be put into the current sink.
Limits the rate at which items can be put into the current sink, with a randomized wait period.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
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.
upcast ref
upcast mut ref
upcast boxed dyn
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more