pub struct Rpc<T: Config> { /* private fields */ }
Expand description
Client for substrate rpc interfaces
Implementations§
source§impl<T: Config> Rpc<T>
impl<T: Config> Rpc<T>
sourcepub fn new<R: RpcClientT>(client: Arc<R>) -> Self
pub fn new<R: RpcClientT>(client: Arc<R>) -> Self
Create a new Rpc
sourcepub async fn storage(
&self,
key: &[u8],
hash: Option<T::Hash>
) -> Result<Option<StorageData>, Error>
pub async fn storage(
&self,
key: &[u8],
hash: Option<T::Hash>
) -> Result<Option<StorageData>, Error>
Fetch the raw bytes for a given storage key
sourcepub async fn storage_keys_paged(
&self,
key: &[u8],
count: u32,
start_key: Option<&[u8]>,
hash: Option<T::Hash>
) -> Result<Vec<StorageKey>, Error>
pub async fn storage_keys_paged(
&self,
key: &[u8],
count: u32,
start_key: Option<&[u8]>,
hash: Option<T::Hash>
) -> Result<Vec<StorageKey>, Error>
Returns the keys with prefix with pagination support.
Up to count
keys will be returned.
If start_key
is passed, return next keys in storage in lexicographic order.
sourcepub async fn query_storage(
&self,
keys: impl IntoIterator<Item = &[u8]>,
from: T::Hash,
to: Option<T::Hash>
) -> Result<Vec<StorageChangeSet<T::Hash>>, Error>
pub async fn query_storage(
&self,
keys: impl IntoIterator<Item = &[u8]>,
from: T::Hash,
to: Option<T::Hash>
) -> Result<Vec<StorageChangeSet<T::Hash>>, Error>
Query historical storage entries
sourcepub async fn query_storage_at(
&self,
keys: impl IntoIterator<Item = &[u8]>,
at: Option<T::Hash>
) -> Result<Vec<StorageChangeSet<T::Hash>>, Error>
pub async fn query_storage_at(
&self,
keys: impl IntoIterator<Item = &[u8]>,
at: Option<T::Hash>
) -> Result<Vec<StorageChangeSet<T::Hash>>, Error>
Query historical storage entries
sourcepub async fn genesis_hash(&self) -> Result<T::Hash, Error>
pub async fn genesis_hash(&self) -> Result<T::Hash, Error>
Fetch the genesis hash
sourcepub async fn metadata(&self, at: Option<T::Hash>) -> Result<Metadata, Error>
pub async fn metadata(&self, at: Option<T::Hash>) -> Result<Metadata, Error>
Fetch the metadata
sourcepub async fn call(
&self,
function: String,
call_parameters: Option<&[u8]>,
at: Option<T::Hash>
) -> Result<Bytes, Error>
pub async fn call(
&self,
function: String,
call_parameters: Option<&[u8]>,
at: Option<T::Hash>
) -> Result<Bytes, Error>
Execute a runtime API call.
sourcepub async fn system_properties(&self) -> Result<SystemProperties, Error>
pub async fn system_properties(&self) -> Result<SystemProperties, Error>
Fetch system properties
sourcepub async fn system_health(&self) -> Result<Health, Error>
pub async fn system_health(&self) -> Result<Health, Error>
Fetch system health
sourcepub async fn system_chain(&self) -> Result<String, Error>
pub async fn system_chain(&self) -> Result<String, Error>
Fetch system chain
sourcepub async fn system_name(&self) -> Result<String, Error>
pub async fn system_name(&self) -> Result<String, Error>
Fetch system name
sourcepub async fn system_version(&self) -> Result<String, Error>
pub async fn system_version(&self) -> Result<String, Error>
Fetch system version
sourcepub async fn system_account_next_index<AccountId: Serialize>(
&self,
account: &AccountId
) -> Result<T::Index, Error>
pub async fn system_account_next_index<AccountId: Serialize>(
&self,
account: &AccountId
) -> Result<T::Index, Error>
Fetch the current nonce for the given account ID.
sourcepub async fn header(
&self,
hash: Option<T::Hash>
) -> Result<Option<T::Header>, Error>
pub async fn header(
&self,
hash: Option<T::Hash>
) -> Result<Option<T::Header>, Error>
Get a header
sourcepub async fn block_hash(
&self,
block_number: Option<BlockNumber>
) -> Result<Option<T::Hash>, Error>
pub async fn block_hash(
&self,
block_number: Option<BlockNumber>
) -> Result<Option<T::Hash>, Error>
Get a block hash, returns hash of latest block by default
sourcepub async fn finalized_head(&self) -> Result<T::Hash, Error>
pub async fn finalized_head(&self) -> Result<T::Hash, Error>
Get a block hash of the latest finalized block
sourcepub async fn block(
&self,
hash: Option<T::Hash>
) -> Result<Option<ChainBlockResponse<T>>, Error>
pub async fn block(
&self,
hash: Option<T::Hash>
) -> Result<Option<ChainBlockResponse<T>>, Error>
Get a Block
sourcepub async fn block_stats(
&self,
block_hash: T::Hash
) -> Result<Option<BlockStats>, Error>
pub async fn block_stats(
&self,
block_hash: T::Hash
) -> Result<Option<BlockStats>, Error>
Reexecute the specified block_hash
and gather statistics while doing so.
This function requires the specified block and its parent to be available
at the queried node. If either the specified block or the parent is pruned,
this function will return None
.
sourcepub async fn read_proof(
&self,
keys: impl IntoIterator<Item = &[u8]>,
hash: Option<T::Hash>
) -> Result<ReadProof<T::Hash>, Error>
pub async fn read_proof(
&self,
keys: impl IntoIterator<Item = &[u8]>,
hash: Option<T::Hash>
) -> Result<ReadProof<T::Hash>, Error>
Get proof of storage entries at a specific block’s state.
sourcepub async fn runtime_version(
&self,
at: Option<T::Hash>
) -> Result<RuntimeVersion, Error>
pub async fn runtime_version(
&self,
at: Option<T::Hash>
) -> Result<RuntimeVersion, Error>
Fetch the runtime version
sourcepub async fn subscribe_best_block_headers(
&self
) -> Result<Subscription<T::Header>, Error>
pub async fn subscribe_best_block_headers(
&self
) -> Result<Subscription<T::Header>, Error>
Subscribe to all new best block headers.
sourcepub async fn subscribe_all_block_headers(
&self
) -> Result<Subscription<T::Header>, Error>
pub async fn subscribe_all_block_headers(
&self
) -> Result<Subscription<T::Header>, Error>
Subscribe to all new block headers.
sourcepub async fn subscribe_finalized_block_headers(
&self
) -> Result<Subscription<T::Header>, Error>
pub async fn subscribe_finalized_block_headers(
&self
) -> Result<Subscription<T::Header>, Error>
Subscribe to finalized block headers.
Note: this may not produce every block in the finalized chain; sometimes multiple blocks are finalized at once, and in this case only the latest one is returned. the higher level APIs that use this “fill in” the gaps for us.
sourcepub async fn subscribe_runtime_version(
&self
) -> Result<Subscription<RuntimeVersion>, Error>
pub async fn subscribe_runtime_version(
&self
) -> Result<Subscription<RuntimeVersion>, Error>
Subscribe to runtime version updates that produce changes in the metadata.
sourcepub async fn submit_extrinsic<X: Encode>(
&self,
extrinsic: X
) -> Result<T::Hash, Error>
pub async fn submit_extrinsic<X: Encode>(
&self,
extrinsic: X
) -> Result<T::Hash, Error>
Create and submit an extrinsic and return corresponding Hash if successful
sourcepub async fn state_call(
&self,
function: &str,
call_parameters: Option<&[u8]>,
at: Option<T::Hash>
) -> Result<Bytes, Error>
pub async fn state_call(
&self,
function: &str,
call_parameters: Option<&[u8]>,
at: Option<T::Hash>
) -> Result<Bytes, Error>
Execute a runtime API call.
sourcepub async fn watch_extrinsic<X: Encode>(
&self,
extrinsic: X
) -> Result<Subscription<SubstrateTxStatus<T::Hash, T::Hash>>, Error>
pub async fn watch_extrinsic<X: Encode>(
&self,
extrinsic: X
) -> Result<Subscription<SubstrateTxStatus<T::Hash, T::Hash>>, Error>
Create and submit an extrinsic and return a subscription to the events triggered.
sourcepub async fn insert_key(
&self,
key_type: String,
suri: String,
public: Bytes
) -> Result<(), Error>
pub async fn insert_key(
&self,
key_type: String,
suri: String,
public: Bytes
) -> Result<(), Error>
Insert a key into the keystore.
sourcepub async fn rotate_keys(&self) -> Result<Bytes, Error>
pub async fn rotate_keys(&self) -> Result<Bytes, Error>
Generate new session keys and returns the corresponding public keys.
sourcepub async fn has_session_keys(&self, session_keys: Bytes) -> Result<bool, Error>
pub async fn has_session_keys(&self, session_keys: Bytes) -> Result<bool, Error>
Checks if the keystore has private keys for the given session public keys.
session_keys
is the SCALE encoded session keys object from the runtime.
Returns true
iff all private keys could be found.
sourcepub async fn has_key(
&self,
public_key: Bytes,
key_type: String
) -> Result<bool, Error>
pub async fn has_key(
&self,
public_key: Bytes,
key_type: String
) -> Result<bool, Error>
Checks if the keystore has private keys for the given public key and key type.
Returns true
if a private key could be found.
sourcepub async fn dry_run(
&self,
encoded_signed: &[u8],
at: Option<T::Hash>
) -> Result<DryRunResult, Error>
pub async fn dry_run(
&self,
encoded_signed: &[u8],
at: Option<T::Hash>
) -> Result<DryRunResult, Error>
Submits the extrinsic to the dry_run RPC, to test if it would succeed.
Returns a types::DryRunResult
, which is the result of performing the dry run.
sourcepub async fn chainhead_unstable_follow(
&self,
runtime_updates: bool
) -> Result<Subscription<FollowEvent<T::Hash>>, Error>
pub async fn chainhead_unstable_follow(
&self,
runtime_updates: bool
) -> Result<Subscription<FollowEvent<T::Hash>>, Error>
Subscribe to chainHead_unstable_follow
to obtain all reported blocks by the chain.
The subscription ID can be used to make queries for the
block’s body (chainhead_unstable_body
),
block’s header (chainhead_unstable_header
),
block’s storage (chainhead_unstable_storage
) and submitting
runtime API calls at this block (chainhead_unstable_call
).
Note
When the user is no longer interested in a block, the user is responsible
for calling the chainhead_unstable_unpin
method.
Failure to do so will result in the subscription being stopped by generating the Stop
event.
sourcepub async fn chainhead_unstable_body(
&self,
subscription_id: String,
hash: T::Hash
) -> Result<Subscription<ChainHeadEvent<String>>, Error>
pub async fn chainhead_unstable_body(
&self,
subscription_id: String,
hash: T::Hash
) -> Result<Subscription<ChainHeadEvent<String>>, Error>
Subscribe to chainHead_unstable_body
to obtain events regarding the block’s body.
Note
The subscription ID is obtained from an open subscription created by
chainhead_unstable_follow
.
sourcepub async fn chainhead_unstable_header(
&self,
subscription_id: String,
hash: T::Hash
) -> Result<Option<String>, Error>
pub async fn chainhead_unstable_header(
&self,
subscription_id: String,
hash: T::Hash
) -> Result<Option<String>, Error>
Get the block’s body using the chainHead_unstable_header
method.
Note
The subscription ID is obtained from an open subscription created by
chainhead_unstable_follow
.
sourcepub async fn chainhead_unstable_storage(
&self,
subscription_id: String,
hash: T::Hash,
key: &[u8],
child_key: Option<&[u8]>
) -> Result<Subscription<ChainHeadEvent<Option<String>>>, Error>
pub async fn chainhead_unstable_storage(
&self,
subscription_id: String,
hash: T::Hash,
key: &[u8],
child_key: Option<&[u8]>
) -> Result<Subscription<ChainHeadEvent<Option<String>>>, Error>
Subscribe to chainHead_storage
to obtain events regarding the
block’s storage.
Note
The subscription ID is obtained from an open subscription created by
chainhead_unstable_follow
.
sourcepub async fn chainhead_unstable_call(
&self,
subscription_id: String,
hash: T::Hash,
function: String,
call_parameters: &[u8]
) -> Result<Subscription<ChainHeadEvent<String>>, Error>
pub async fn chainhead_unstable_call(
&self,
subscription_id: String,
hash: T::Hash,
function: String,
call_parameters: &[u8]
) -> Result<Subscription<ChainHeadEvent<String>>, Error>
Subscribe to chainHead_call
to obtain events regarding the
runtime API call.
Note
The subscription ID is obtained from an open subscription created by
chainhead_unstable_follow
.
sourcepub async fn chainhead_unstable_unpin(
&self,
subscription_id: String,
hash: T::Hash
) -> Result<(), Error>
pub async fn chainhead_unstable_unpin(
&self,
subscription_id: String,
hash: T::Hash
) -> Result<(), Error>
Unpin a block reported by the chainHead_follow
subscription.
Note
The subscription ID is obtained from an open subscription created by
chainhead_unstable_follow
.
sourcepub async fn chainhead_unstable_genesishash(&self) -> Result<T::Hash, Error>
pub async fn chainhead_unstable_genesishash(&self) -> Result<T::Hash, Error>
Get genesis hash obtained from the chainHead_genesisHash
method.
Methods from Deref<Target = RpcClient>§
sourcepub async fn request<Res: DeserializeOwned>(
&self,
method: &str,
params: RpcParams
) -> Result<Res, Error>
pub async fn request<Res: DeserializeOwned>(
&self,
method: &str,
params: RpcParams
) -> Result<Res, Error>
Make an RPC request, given a method name and some parameters.
See RpcParams
and the rpc_params!
macro for an example of how to
construct the parameters.
sourcepub async fn subscribe<Res: DeserializeOwned>(
&self,
sub: &str,
params: RpcParams,
unsub: &str
) -> Result<Subscription<Res>, Error>
pub async fn subscribe<Res: DeserializeOwned>(
&self,
sub: &str,
params: RpcParams,
unsub: &str
) -> Result<Subscription<Res>, Error>
Subscribe to an RPC endpoint, providing the parameters and the method to call to unsubscribe from it again.
See RpcParams
and the rpc_params!
macro for an example of how to
construct the parameters.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Rpc<T>
impl<T> Send for Rpc<T>
impl<T> Sync for Rpc<T>
impl<T> Unpin for Rpc<T>where
T: Unpin,
impl<T> !UnwindSafe for Rpc<T>
Blanket Implementations§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresource§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
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) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds. Read moresource§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.