Skip to main content

Client

Enum Client 

Source
pub enum Client {
    Http(HttpClient),
    Ws(WsReconnectClient<WsClient>),
}
Available on non-WebAssembly only.
Expand description

Json RPC client.

Variants§

§

Http(HttpClient)

A client using ‘http[s]’ protocol.

§

Ws(WsReconnectClient<WsClient>)

A client using ‘ws[s]’ protocol.

Implementations§

Source§

impl Client

Source

pub async fn new( url: &str, auth_token: Option<&str>, connect_timeout: Option<Duration>, request_timeout: Option<Duration>, ) -> Result<Self, Error>

Create a new Json RPC client.

Only ‘http[s]’ and ‘ws[s]’ protocols are supported and they should be specified in the provided url. For more flexibility consider creating the client using jsonrpsee directly.

Please note that currently the celestia-node supports only ‘http’ and ‘ws’. For a secure connection you have to hide it behind a proxy.

Trait Implementations§

Source§

impl ClientT for Client

Source§

async fn notification<Params>( &self, method: &str, params: Params, ) -> Result<(), ClientError>
where Params: ToRpcParams + Send,

Source§

async fn request<R, Params>( &self, method: &str, params: Params, ) -> Result<R, ClientError>
where R: DeserializeOwned, Params: ToRpcParams + Send,

Source§

async fn batch_request<'a, R>( &self, batch: BatchRequestBuilder<'a>, ) -> Result<BatchResponse<'a, R>, ClientError>
where R: DeserializeOwned + Debug + 'a,

Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SubscriptionClientT for Client

Source§

async fn subscribe<'a, N, Params>( &self, subscribe_method: &'a str, params: Params, unsubscribe_method: &'a str, ) -> Result<Subscription<N>, ClientError>
where Params: ToRpcParams + Send, N: DeserializeOwned,

Initiate a subscription by performing a JSON-RPC method call where the server responds with a Subscription ID that is used to fetch messages on that subscription, Read more
Source§

async fn subscribe_to_method<N>( &self, method: &str, ) -> Result<Subscription<N>, ClientError>

Register a method subscription, this is used to filter only server notifications that a user is interested in. Read more

Auto Trait Implementations§

§

impl !Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl UnsafeUnpin for Client

§

impl !UnwindSafe for Client

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> BlobClient for T
where T: ClientT,

Source§

fn blob_get<'a, 'fut>( &'a self, height: u64, namespace: Namespace, commitment: Commitment, ) -> impl Future<Output = Result<Blob, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

Get retrieves the blob by commitment under the given namespace and height.
Source§

fn blob_get_all<'a, 'b, 'fut>( &'a self, height: u64, namespaces: &'b [Namespace], ) -> impl Future<Output = Result<Option<Vec<Blob>>, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut, 'b: 'fut,

GetAll returns all blobs under the given namespaces and height.
Source§

fn blob_get_proof<'a, 'fut>( &'a self, height: u64, namespace: Namespace, commitment: Commitment, ) -> impl Future<Output = Result<Vec<NamespaceProof>, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetProof retrieves proofs in the given namespaces at the given height by commitment.
Source§

fn blob_included<'a, 'b, 'fut>( &'a self, height: u64, namespace: Namespace, proof: &'b NamespaceProof, commitment: Commitment, ) -> impl Future<Output = Result<bool, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut, 'b: 'fut,

Included checks whether a blob’s given commitment(Merkle subtree root) is included at given height and under the namespace.
Source§

fn blob_submit<'a, 'b, 'fut>( &'a self, blobs: &'b [Blob], opts: TxConfig, ) -> impl Future<Output = Result<u64, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut, 'b: 'fut,

Submit sends Blobs and reports the height in which they were included. Allows sending multiple Blobs atomically synchronously. Uses default wallet registered on the Node.
Source§

fn blob_subscribe<'a>( &'a self, namespace: Namespace, ) -> Pin<Box<dyn Stream<Item = Result<BlobsAtHeight, Error>> + Send + 'a>>
where Self: SubscriptionClientT + Sized + Sync,

Subscribe to published blobs from the given namespace as they are included. Read more
Source§

impl<T> BlobstreamClient for T
where T: ClientT,

Source§

fn blobstream_get_data_root_tuple_root<'a, 'fut>( &'a self, start: u64, end: u64, ) -> impl Future<Output = Result<Hash, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

Collects the data roots over a provided ordered range of blocks, and then creates a new Merkle root of those data roots. Read more
Source§

fn blobstream_get_data_root_tuple_inclusion_proof<'a, 'fut>( &'a self, height: u64, start: u64, end: u64, ) -> impl Future<Output = Result<MerkleProof, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

Creates an inclusion proof, for the data root tuple of block height height, in the set of blocks defined by start and end. Read more
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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<TypeJsonRpseeInternal> DasClient for TypeJsonRpseeInternal
where TypeJsonRpseeInternal: ClientT,

Source§

fn das_sampling_stats( &self, ) -> impl Future<Output = Result<SamplingStats, Error>> + Send

Retrieves the current statistics over the DA sampling process.
Source§

fn das_wait_catch_up(&self) -> impl Future<Output = Result<(), Error>> + Send

Blocks until DASer finishes catching up to the network head.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> FraudClient for T
where T: ClientT,

Source§

fn fraud_get<'a, 'fut>( &'a self, proof_type: ProofType, ) -> impl Future<Output = Result<Vec<Proof>, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

Fetches fraud proofs by their type.
Source§

fn fraud_subscribe<'a>( &'a self, proof_type: ProofType, ) -> Pin<Box<dyn Stream<Item = Result<Proof, Error>> + Send + 'a>>
where Self: SubscriptionClientT + Sized + Sync,

Subscribe to fraud proof by its type. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HeaderClient for T
where T: ClientT,

Source§

fn header_get_by_hash<'a, 'fut>( &'a self, hash: Hash, ) -> impl Future<Output = Result<ExtendedHeader, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetByHash returns the header of the given hash from the node’s header store.
Source§

fn header_get_by_height<'a, 'fut>( &'a self, height: u64, ) -> impl Future<Output = Result<ExtendedHeader, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetByHeight returns the ExtendedHeader at the given height if it is currently available.
Source§

fn header_get_range_by_height<'a, 'b, 'fut>( &'a self, from: ExtendedHeader, to: u64, ) -> impl Future<Output = Result<Vec<ExtendedHeader>, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut, 'b: 'fut,

GetRangeByHeight returns the given range (from:to) of ExtendedHeaders from the node’s header store and verifies that the returned headers are adjacent to each other.
Source§

fn header_local_head<'a, 'fut>( &'a self, ) -> impl Future<Output = Result<ExtendedHeader, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

LocalHead returns the ExtendedHeader of the chain head.
Source§

fn header_network_head<'a, 'fut>( &'a self, ) -> impl Future<Output = Result<ExtendedHeader, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

NetworkHead provides the Syncer’s view of the current network head.
Source§

fn header_subscribe<'a>( &'a self, ) -> Pin<Box<dyn Stream<Item = Result<ExtendedHeader, Error>> + Send + 'a>>
where Self: SubscriptionClientT + Sized + Sync,

Subscribe to recent ExtendedHeaders from the network. Read more
Source§

fn header_sync_state<'a, 'fut>( &'a self, ) -> impl Future<Output = Result<SyncState, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

SyncState returns the current state of the header Syncer.
Source§

fn header_sync_wait<'a, 'fut>( &'a self, ) -> impl Future<Output = Result<(), Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

SyncWait blocks until the header Syncer is synced to network head.
Source§

fn header_wait_for_height<'a, 'fut>( &'a self, height: u64, ) -> impl Future<Output = Result<ExtendedHeader, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

WaitForHeight blocks until the header at the given height has been processed by the store or context deadline is exceeded.
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<TypeJsonRpseeInternal> P2PClient for TypeJsonRpseeInternal
where TypeJsonRpseeInternal: ClientT,

Source§

fn p2p_bandwidth_for_peer( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<BandwidthStats, Error>> + Send

Available on crate feature p2p only.
BandwidthForPeer returns a Stats struct with bandwidth metrics associated with the given peer.ID. The metrics returned include all traffic sent / received for the peer, regardless of protocol.
Source§

fn p2p_bandwidth_for_protocol( &self, protocol_id: &str, ) -> impl Future<Output = Result<BandwidthStats, Error>> + Send

Available on crate feature p2p only.
BandwidthForProtocol returns a Stats struct with bandwidth metrics associated with the given protocol.ID.
Source§

fn p2p_bandwidth_stats( &self, ) -> impl Future<Output = Result<BandwidthStats, Error>> + Send

Available on crate feature p2p only.
BandwidthStats returns a Stats struct with bandwidth metrics for all data sent/received by the local peer, regardless of protocol or remote peer IDs.
Source§

fn p2p_block_peer( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<(), Error>> + Send

Available on crate feature p2p only.
BlockPeer adds a peer to the set of blocked peers.
Source§

fn p2p_close_peer( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<(), Error>> + Send

Available on crate feature p2p only.
ClosePeer closes the connection to a given peer.
Source§

fn p2p_connect( &self, address: &AddrInfo, ) -> impl Future<Output = Result<(), Error>> + Send

Available on crate feature p2p only.
Connect ensures there is a connection between this host and the peer with given peer.
Source§

fn p2p_connectedness( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<Connectedness, Error>> + Send

Available on crate feature p2p only.
Connectedness returns a state signaling connection capabilities.
Source§

fn p2p_info(&self) -> impl Future<Output = Result<AddrInfo, Error>> + Send

Available on crate feature p2p only.
Info returns address information about the host.
Source§

fn p2p_is_protected( &self, peer_id: &PeerId, tag: &str, ) -> impl Future<Output = Result<bool, Error>> + Send

Available on crate feature p2p only.
IsProtected returns whether the given peer is protected.
Source§

fn p2p_list_blocked_peers( &self, ) -> impl Future<Output = Result<Vec<PeerId>, Error>> + Send

Available on crate feature p2p only.
ListBlockedPeers returns a list of blocked peers.
Source§

fn p2p_nat_status( &self, ) -> impl Future<Output = Result<Reachability, Error>> + Send

Available on crate feature p2p only.
NATStatus returns the current NAT status.
Source§

fn p2p_peer_info( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<AddrInfo, Error>> + Send

Available on crate feature p2p only.
PeerInfo returns a small slice of information Peerstore has on the given peer.
Source§

fn p2p_peers(&self) -> impl Future<Output = Result<Vec<PeerId>, Error>> + Send

Available on crate feature p2p only.
Peers returns connected peers.
Source§

fn p2p_protect( &self, peer_id: &PeerId, tag: &str, ) -> impl Future<Output = Result<(), Error>> + Send

Available on crate feature p2p only.
Protect adds a peer to the list of peers who have a bidirectional peering agreement that they are protected from being trimmed, dropped or negatively scored.
Source§

fn p2p_pub_sub_peers( &self, topic: &str, ) -> impl Future<Output = Result<Option<Vec<PeerId>>, Error>> + Send

Available on crate feature p2p only.
PubSubPeers returns the peer IDs of the peers joined on the given topic.
Source§

fn p2p_resource_state( &self, ) -> impl Future<Output = Result<ResourceManagerStats, Error>> + Send

Available on crate feature p2p only.
ResourceState returns the state of the resource manager.
Source§

fn p2p_unblock_peer( &self, peer_id: &PeerId, ) -> impl Future<Output = Result<(), Error>> + Send

Available on crate feature p2p only.
UnblockPeer removes a peer from the set of blocked peers.
Source§

fn p2p_unprotect( &self, peer_id: &PeerId, tag: &str, ) -> impl Future<Output = Result<bool, Error>> + Send

Available on crate feature p2p only.
Unprotect removes a peer from the list of peers who have a bidirectional peering agreement that they are protected from being trimmed, dropped or negatively scored, returning a bool representing whether the given peer is protected or not.
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ShareClient for T
where T: ClientT,

Source§

fn share_get_eds<'a, 'fut>( &'a self, height: u64, ) -> impl Future<Output = Result<ExtendedDataSquare, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetEDS gets the full EDS identified at the specified height.
Source§

fn share_get_range<'a, 'fut>( &'a self, height: u64, start: u64, end: u64, ) -> impl Future<Output = Result<GetRangeResponse, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

Retrieves a list of shares and their corresponding proof. Read more
Source§

fn share_get_samples<'a, 'fut, I, C>( &'a self, height: u64, coordinates: I, ) -> impl Future<Output = Result<Vec<Sample>, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, I: IntoIterator<Item = C>, C: Into<SampleCoordinates>, 'a: 'fut,

Retrieves multiple shares from the ExtendedDataSquare at the given height at the given sample coordinates. Read more
Source§

fn share_get_row<'a, 'fut>( &'a self, height: u64, square_width: u16, row: u16, ) -> impl Future<Output = Result<GetRowResponse, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetShare gets the list of shares in a single row.
Source§

fn share_get_share<'a, 'fut>( &'a self, height: u64, square_width: u16, row: u16, col: u16, ) -> impl Future<Output = Result<Share, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetShare gets a Share by coordinates in EDS.
Source§

fn share_get_namespace_data<'a, 'fut>( &'a self, height: u64, namespace: Namespace, ) -> impl Future<Output = Result<NamespaceData, Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

GetNamespaceData gets all shares from an EDS within the given namespace. Read more
Source§

fn share_shares_available<'a, 'fut>( &'a self, height: u64, ) -> impl Future<Output = Result<(), Error>> + Send + 'fut
where Self: Sized + Sync + 'fut, 'a: 'fut,

SharesAvailable subjectively validates if Shares committed to the given Root are available on the Network.
Source§

impl<TypeJsonRpseeInternal> StateClient for TypeJsonRpseeInternal
where TypeJsonRpseeInternal: ClientT,

Source§

fn state_account_address( &self, ) -> impl Future<Output = Result<Address, Error>> + Send

Returns the default account address for the node.
Source§

fn state_balance(&self) -> impl Future<Output = Result<Coin, Error>> + Send

Returns the balance for the node’s default account.
Source§

fn state_balance_for_address( &self, addr: Address, ) -> impl Future<Output = Result<Coin, Error>> + Send

Retrieves the Celestia coin balance for a specific address. Verifies the returned balance against the corresponding block’s AppHash.
Source§

fn state_begin_redelegate( &self, src: ValAddress, dest: ValAddress, amount: u64, config: TxConfig, ) -> impl Future<Output = Result<RawTxResponse, Error>> + Send

Begins a redelegation from one validator to another.
Source§

fn state_cancel_unbonding_delegation( &self, addr: ValAddress, amount: u64, height: u64, config: TxConfig, ) -> impl Future<Output = Result<RawTxResponse, Error>> + Send

Cancels an unbonding delegation at a specific height.
Source§

fn state_delegate( &self, addr: ValAddress, amount: u64, config: TxConfig, ) -> impl Future<Output = Result<RawTxResponse, Error>> + Send

Delegates tokens to a validator.
Source§

fn state_is_stopped(&self) -> impl Future<Output = Result<bool, Error>> + Send

Checks whether the state service is stopped.
Source§

fn state_query_delegation( &self, addr: ValAddress, ) -> impl Future<Output = Result<QueryDelegationResponse, Error>> + Send

Queries delegation details for the given validator address.
Source§

fn state_query_redelegations( &self, src: ValAddress, dest: ValAddress, ) -> impl Future<Output = Result<QueryRedelegationsResponse, Error>> + Send

Queries redelegations between the given validators.
Source§

fn state_query_unbonding( &self, addr: ValAddress, ) -> impl Future<Output = Result<QueryUnbondingDelegationResponse, Error>> + Send

Queries unbonding delegations for the given validator address.
Source§

fn state_submit_pay_for_blob( &self, blobs: Vec<RawBlob>, config: TxConfig, ) -> impl Future<Output = Result<RawTxResponse, Error>> + Send

Submits a pay-for-blob transaction for the provided blobs.
Source§

fn state_transfer( &self, to: AccAddress, amount: u64, config: TxConfig, ) -> impl Future<Output = Result<RawTxResponse, Error>> + Send

Transfers tokens to a destination account.
Source§

fn state_undelegate( &self, addr: ValAddress, amount: u64, config: TxConfig, ) -> impl Future<Output = Result<RawTxResponse, Error>> + Send

Undelegates tokens from a validator.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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
Source§

impl<S> CondSend for S
where S: Send,

Source§

impl<S> CondSync for S
where S: Send + Sync,

Source§

impl<T> MaybeSend for T
where T: Send,