Skip to main content

Processor

Struct Processor 

Source
pub struct Processor {
    pub swarm: Arc<Swarm>,
    /* private fields */
}
Expand description

Processor for rings-node rpc server.

Cloning shares the same node handle; publishes from any clone are serialized against each other.

Fields§

§swarm: Arc<Swarm>

a swarm instance

Implementations§

Source§

impl Processor

Source

pub async fn connect_with_did(&self, did: Did) -> Result<()>

Connect peer with web3 did. There are 3 peers: PeerA, PeerB, PeerC.

  1. PeerA has a connection with PeerB.
  2. PeerC has a connection with PeerB.
  3. PeerC can connect PeerA with PeerA’s web3 address.

This operation is idempotent: if topology convergence already produced the direct connection, the requested connection is satisfied.

Source§

impl Processor

Source

pub async fn send_message(&self, destination: Did, msg: &[u8]) -> Result<Uuid>

Send custom message to a did.

Source

pub async fn send_direct_message( &self, destination: Did, msg: &[u8], ) -> Result<Uuid>

Send a custom message to an already connected peer without Chord routing.

Protocols with their own authenticated hop selection, such as onion circuits, use this to keep the core transport from replacing their selected next hop.

Source

pub async fn send_e2e_handshake(&self, destination: Did) -> Result<Uuid>

Send an E2E handshake request to a DID.

The negotiated key is the peer’s account/identity secp256k1 key, not the ephemeral delegatee key.

Source

pub async fn send_e2e_message( &self, destination: Did, recipient_public_key: PublicKey<33>, msg: &[u8], ) -> Result<Uuid>

Send an ElGamal-encrypted E2E message to a DID with a verified recipient key.

Returns the stream id shared by all emitted E2E stream frames.

Source

pub async fn send_e2e_message_with_frame_len( &self, destination: Did, recipient_public_key: PublicKey<33>, msg: &[u8], max_plaintext_frame_len: usize, ) -> Result<Uuid>

Send an ElGamal-encrypted E2E stream with an explicit plaintext frame size.

Returns the stream id shared by all emitted E2E stream frames.

Source

pub fn verify_e2e_handshake_request( &self, requester: Did, request: &E2eHandshakeRequest, ) -> Result<PublicKey<33>>

Verify an E2E handshake request and return the requester’s identity public key.

Source

pub fn verify_e2e_handshake_response( &self, responder: Did, response: &E2eHandshakeResponse, ) -> Result<PublicKey<33>>

Verify an E2E handshake response and return the responder’s identity public key.

Source

pub fn e2e_stream_decryptor( &self, expected_sender: Did, stream_id: E2eStreamId, recipient_identity_key: SecretKey, ) -> Result<E2eStreamDecryptor>

Create an E2E stream decryptor with this node’s identity/signing secret key; its stall deadline runs from now.

The ciphertext is encrypted to the DID/account key negotiated by the handshake. A session private key cannot decrypt it unless the delegatee key is also the account key, so callers must supply the local identity key explicitly.

Source

pub fn decrypt_e2e_stream_frame( &self, decryptor: &mut E2eStreamDecryptor, frame: &E2eStreamFrame, ) -> Result<Vec<u8>>

Decrypt one E2E stream frame arriving now with an already-created stream decryptor. Fails with E2eStreamStalled once the stream has made no progress for its stall deadline: a frame of it was lost.

Source

pub fn check_e2e_stream(&self, decryptor: &E2eStreamDecryptor) -> Result<()>

Whether an E2E stream is still live now; poll it while no frame of the stream arrives, so a lost frame (the final one included) is reported rather than waited for.

Source

pub async fn send_envelope( &self, destination: Did, envelope: &Envelope, ) -> Result<Uuid>

Send a namespaced Envelope to a did over the P2P transport (the wire codec of the extension layer). send_envelope : (Did, Envelope) → IO TxId.

Source

pub async fn send_direct_envelope( &self, destination: Did, envelope: &Envelope, ) -> Result<Uuid>

Send a namespaced envelope directly to an already connected peer.

This bypasses Chord routing while retaining the normal custom-message envelope codec.

Source§

impl Processor

Source

pub async fn republish_registrations(&self)

Immediately publish one heartbeat of every configured registration task with the active session key, so peers and registries observe a renewed delegatee_public_key without waiting for the next periodic tick (#1153).

Source

pub async fn registrations_published(&self)

Resolves once every registration of this node is stored at its owners, as they reported it (#866): for each registration task, a publish that began with an admitted edge was reported stored by the owner of every remote placement (registration::RegistrationReadiness). It resolves at once for a node with no registration, and needs a running listener otherwise. A registry read by another node then reaches the registrations at their owners, unless an owner has lost its placement since.

Source§

impl Processor

Source

pub fn did(&self) -> Did

Get current did

Source

pub fn clock(&self) -> &SharedClock

Return the SharedClock capability bound to this processor.

Source

pub fn rng(&self) -> &SharedRng

Return the SharedRng capability bound to this processor.

Source

pub fn session_transport_credentials(&self) -> Option<String>

Return the currently installed session-bound transport credential string on a built-in ICE-backed transport, or None for custom transports that do not carry ICE credentials.

Source

pub fn network_parameters(&self) -> &Arc<dyn NodeNetworkParameters> ⓘ

Return the NodeNetworkParameters customizing this processor’s transport.

Source

pub fn renew_delegatee_key( &self, next: DelegateeKey, now_ms: u128, ) -> Result<DelegationHorizon>

Replace this node’s active session key in process at now_ms, retaining the previous key until its delegation expires and updating the swarm transport (#1153).

Laws:

  • Monotone horizon: h' > h. A renewal never shortens the signing horizon.
  • No unsigned gap: next authorizes self.did(), verifies at now_ms, and is before h'.
Source

pub fn signing_horizon(&self) -> DelegationHorizon

The signing horizon of this node’s own delegation: from it on, the node can send nothing unless it renews or restarts with a fresh delegation (#1063, #1153). A native daemon renews at h - lead when configured with a delegator key and ends at h otherwise; a browser or FFI embedder reads it here, or as overlay_ready = false, and acts itself.

Source

pub const fn onion_role(&self) -> &OnionRole<OnionExitOffer>

Return the onion symbols this process registers (#834 D2).

Source

pub const fn onion_udp_bind_config(&self) -> OnionUdpBindConfig

Return the socket binding and peer-IP admission settings for native onion::udp exits.

Source

pub async fn publish_online_node_descriptor( &self, ) -> Result<OnlineNodeDescriptor>

Publish this node’s signed online descriptor to the online-node registry.

Source

pub async fn lookup_online_nodes( &self, include_expired: bool, ) -> Result<Vec<OnlineNodeDescriptor>>

List signed online-node descriptors from the registry.

The registry carrier is the join of every reply this node has observed (#864), with its own writes applied (#982): it ascends in the lattice order while cached and live, so this node lists what it registered itself whichever owner its lookup reaches, but a descriptor still leaves it on a tombstone, on an overwrite’s reset floor, or at the element cap. Rerouted as Self::storage_fetch documents.

Source

pub async fn lookup_onion_exits( &self, service: &str, include_expired: bool, ) -> Result<Vec<OnionExitDescriptor>>

List signed onion-exit descriptors from the application-layer exit registry.

Like Self::lookup_online_nodes, the carrier read is the join of the observed replies (#864) with this node’s own writes applied (#982). Rerouted as Self::storage_fetch documents.

Source

pub async fn lookup_onion_invokes( &self, shape: Option<OnionInvokeShape>, backend: &str, include_expired: bool, ) -> Result<Vec<OnionInvokeDescriptor>>

List signed intermediate invoke descriptors from crate::onion::ONION_INVOKES_TOPIC, optionally filtered by shape and/or canonical backend name.

Source

pub async fn build_onion_pipeline_route( &self, pipeline: &OnionInvokePipeline, ) -> Result<OnionPipelineRoute>

Build a guard-closed multi-hop route for an intermediate invoke Kleisli pipeline.

Source

pub async fn build_onion_pipeline_route_for_dids( &self, pipeline: &OnionInvokePipeline, eligible_stage_dids: &BTreeSet<Did>, ) -> Result<OnionPipelineRoute>

Build a guard-closed multi-hop route for pipeline whose candidate stage crate::onion::OnionInvokeDescriptors belong to eligible_stage_dids.

Source

pub async fn build_onion_pipeline_route_filtered( &self, pipeline: &OnionInvokePipeline, predicate: impl Fn(&OnionInvokeDescriptor) -> bool, ) -> Result<OnionPipelineRoute>

Build a guard-closed multi-hop route for pipeline whose candidate stage crate::onion::OnionInvokeDescriptors satisfy predicate.

Source

pub async fn lookup_registry_descriptors<D>( &self, topic: &str, include_expired: bool, ) -> Result<Vec<D>>

Fetch a DHT registry topic and return the newest valid crate::descriptor::SignedDescriptor per DID at the processor’s current clock (#918).

Source

pub async fn fetch_topic_entry(&self, topic: &str) -> Result<Option<Entry>>

Fetch the raw normalized DHT entry::Entry stored under topic, if any.

Source

pub async fn build_onion_proxy_route( &self, proxy: OnionProxyProtocol, target: OnionProxyTarget, ) -> Result<OnionProxyRoute>

Build an onion proxy route for a client target through a target-agnostic proxy config.

Source

pub async fn listen(&self)

Run stabilization and node registration tasks until this future is dropped or aborted.

This is a long-running task; do not await completion as a readiness signal. Concurrent calls on this processor queue, and each call retains ownership through cleanup.

Source

pub async fn listen_with(&self, stop: StopToken)

Run stabilization and node registration tasks until stop asks them to exit.

Concurrent calls on this processor queue, including calls through any clone or provider wrapper. A stop requested while queued is observed after that call acquires ownership, so its cleanup cannot overlap the current generation.

The shutdown is cooperative: it waits for the current stabilization or registration operation to finish before returning. This avoids dropping browser IndexedDB request futures while their JavaScript callbacks are still pending.

Source

pub async fn flush_measurements(&self) -> Result<()>

Flush all applied measurement updates with the graceful-shutdown deadline.

Source

pub async fn disconnect(&self, did: Did) -> Result<()>

Disconnect a peer with web3 did.

Source

pub async fn leave(&self) -> Result<()>

Best-effort voluntary departure (#1057): hand off live relay carriers to remaining members and send Leave { successor_list } to this node’s predecessor and successor head before transports close.

Source

pub async fn close(&self) -> Result<()>

Close this node’s network: the swarm sends a best-effort departure (Swarm::leave, #1057), opens no connection from now on and closes every one it has (Swarm::close, #1098), then the applied measurements are flushed.

These are steps (c) and (d) of Provider::close only: this stops no task and releases no store. A node that stops in a process that goes on is closed with Provider::close, which also stops the node’s tasks and awaits the release of its stores (#1085). Each peer sees its connection close at once instead of waiting for an ICE timeout.

Both steps run even if the first fails; the first failure is returned.

Source

pub async fn storage_check_cache(&self, entry_key: Did) -> Option<Entry>

check local cache of dht

Source

pub async fn storage_fetch(&self, entry_key: Did) -> Result<()>

Fetch an entry from DHT storage

§Rerouting

Every DHT operation of this processor (fetch, store, append, tombstone, and the registry lookups and writes built on them) is rerouted as core’s ChordStorageInterface documents (#859): refusals before acceptance are retried on events within a budget, and no placement is applied twice. A caller that must bound the wait drops the operation.

Source

pub async fn storage_store(&self, entry: Entry) -> Result<()>

Store an entry on DHT storage, replacing its payloads.

Each stored payload expires by the element lifetime rule of ChordStorageInterface unless it is written again. Its visibility is that interface’s: once this returns Ok, this node reads the entry (read-your-writes, #982); another node reads it once an owner its lookup reaches holds it.

Rerouted as Self::storage_fetch documents.

Source

pub async fn storage_append_data(&self, topic: &str, data: Bytes) -> Result<()>

Append data to an entry on DHT storage.

The appended element expires by the element lifetime rule of ChordStorageInterface, even while other writes keep the topic alive, unless it is appended again.

Rerouted as Self::storage_fetch documents.

Source

pub async fn storage_extend_reported( &self, topic: &str, data: Vec<Bytes>, lifetime_ms: u64, quorum: StoreQuorum, stop: &StopToken, ) -> Result<StoreReceipt>

Append the elements data to the data topic topic as one delta, requesting the retention bound now + lifetime_ms, whose owners report it (core’s storage_extend_reported): the receipt resolves once their reports decide quorum.

Rerouted as Self::storage_fetch documents, its rerouting waits ending at stop.

Source

pub async fn storage_tombstone_data( &self, topic: &str, data: Bytes, ) -> Result<()>

Tombstone observed data in an entry on DHT storage.

The removal covers every dot of data the storage owner holds, including earlier dots forgotten under a later one, and is collected once every add it covers has expired.

Rerouted as Self::storage_fetch documents.

Source

pub async fn peer_measurement(&self, did: Did) -> Option<PeerMeasurement>

Return local measurement counters for a peer, if observed.

Source

pub async fn peer_measurements(&self) -> Vec<PeerMeasurement>

Return every retained local peer measurement.

Source

pub async fn peer_measurements_page( &self, after: Option<Did>, limit: NonZeroUsize, ) -> PeerMeasurementPage

Return one bounded page of retained local peer measurements.

Source

pub async fn provisional_evidence_page( &self, after: Option<EvidenceDigest>, limit: NonZeroUsize, ) -> Result<EvidencePage<Did>, EvidenceError>

Return one bounded page of locally collected provisional receipts.

Source

pub async fn provisional_evidence_counters(&self) -> EvidenceCounters

Return aggregate receipt admission and eviction counters without account labels.

Source

pub fn origin_quota_counters(&self) -> OriginQuotaCounters

Return aggregate final-destination origin-quota drops by lane and reason.

Source

pub async fn register_service(&self, name: &str) -> Result<()>

Register this node under the service name name.

The registration is one appended element, so it expires by the element lifetime rule of ChordStorageInterface unless it is registered again.

Source

pub async fn get_node_info(&self) -> Result<NodeInfoResponse>

get node info

Source

pub async fn operator_snapshot(&self) -> Result<OperatorSnapshot>

Assemble the documented v1 operator snapshot without serializing stored entry payloads.

Trait Implementations§

Source§

impl Clone for Processor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Drop for Processor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl HandleRpc<AcceptAnswerRequest, AcceptAnswerResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: AcceptAnswerRequest, ) -> Pin<Box<dyn Future<Output = Result<AcceptAnswerResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<AnswerOfferRequest, AnswerOfferResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: AnswerOfferRequest, ) -> Pin<Box<dyn Future<Output = Result<AnswerOfferResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<ConnectPeerViaHttpRequest, ConnectPeerViaHttpResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: ConnectPeerViaHttpRequest, ) -> Pin<Box<dyn Future<Output = Result<ConnectPeerViaHttpResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<ConnectWithDidRequest, ConnectWithDidResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: ConnectWithDidRequest, ) -> Pin<Box<dyn Future<Output = Result<ConnectWithDidResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<ConnectWithSeedRequest, ConnectWithSeedResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: ConnectWithSeedRequest, ) -> Pin<Box<dyn Future<Output = Result<ConnectWithSeedResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<CreateOfferRequest, CreateOfferResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: CreateOfferRequest, ) -> Pin<Box<dyn Future<Output = Result<CreateOfferResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<DisconnectRequest, DisconnectResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: DisconnectRequest, ) -> Pin<Box<dyn Future<Output = Result<DisconnectResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<FetchTopicMessagesRequest, FetchTopicMessagesResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: FetchTopicMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<FetchTopicMessagesResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<ListPeerMeasurementsRequest, ListPeerMeasurementsResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: ListPeerMeasurementsRequest, ) -> Pin<Box<dyn Future<Output = Result<ListPeerMeasurementsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<ListPeersRequest, ListPeersResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, _req: ListPeersRequest, ) -> Pin<Box<dyn Future<Output = Result<ListPeersResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<LookupOnionExitsRequest, LookupOnionExitsResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: LookupOnionExitsRequest, ) -> Pin<Box<dyn Future<Output = Result<LookupOnionExitsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<LookupOnlineNodesRequest, LookupOnlineNodesResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: LookupOnlineNodesRequest, ) -> Pin<Box<dyn Future<Output = Result<LookupOnlineNodesResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<LookupServiceRequest, LookupServiceResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: LookupServiceRequest, ) -> Pin<Box<dyn Future<Output = Result<LookupServiceResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<NodeDidRequest, NodeDidResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, _req: NodeDidRequest, ) -> Pin<Box<dyn Future<Output = Result<NodeDidResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<NodeInfoRequest, NodeInfoResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, _req: NodeInfoRequest, ) -> Pin<Box<dyn Future<Output = Result<NodeInfoResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<PeerMeasurementRequest, PeerMeasurementResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: PeerMeasurementRequest, ) -> Pin<Box<dyn Future<Output = Result<PeerMeasurementResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<PublishMessageToTopicRequest, PublishMessageToTopicResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: PublishMessageToTopicRequest, ) -> Pin<Box<dyn Future<Output = Result<PublishMessageToTopicResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<RegisterServiceRequest, RegisterServiceResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: RegisterServiceRequest, ) -> Pin<Box<dyn Future<Output = Result<RegisterServiceResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<SendBackendMessageRequest, SendBackendMessageResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: SendBackendMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<SendBackendMessageResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<SendE2eHandshakeRequest, SendE2eHandshakeResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: SendE2eHandshakeRequest, ) -> Pin<Box<dyn Future<Output = Result<SendE2eHandshakeResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.
Source§

impl HandleRpc<SendE2eMessageRequest, SendE2eMessageResponse> for Processor

Source§

fn handle_rpc<'life0, 'async_trait>( &'life0 self, req: SendE2eMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<SendE2eMessageResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle rpc request and return response.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more