pub struct ReadApi { /* private fields */ }Expand description
Defines methods for retrieving data about objects and transactions.
Implementations§
Source§impl ReadApi
impl ReadApi
Sourcepub async fn get_owned_objects(
&self,
address: IotaAddress,
query: impl Into<Option<IotaObjectResponseQuery>>,
cursor: impl Into<Option<ObjectID>>,
limit: impl Into<Option<usize>>,
) -> IotaRpcResult<ObjectsPage>
pub async fn get_owned_objects( &self, address: IotaAddress, query: impl Into<Option<IotaObjectResponseQuery>>, cursor: impl Into<Option<ObjectID>>, limit: impl Into<Option<usize>>, ) -> IotaRpcResult<ObjectsPage>
Get the objects owned by the given address. Results are paginated.
Note that if the address owns more than
QUERY_MAX_RESULT_LIMIT
objects (default is 50), the pagination may not be accurate as the
previous page may have been updated before the next page is fetched.
§Examples
use std::str::FromStr;
use iota_sdk::{IotaClientBuilder, types::base_types::IotaAddress};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let address = IotaAddress::from_str("0x0000....0000")?;
let owned_objects = iota
.read_api()
.get_owned_objects(address, None, None, None)
.await?;
Ok(())
}Sourcepub async fn get_dynamic_fields(
&self,
object_id: ObjectID,
cursor: impl Into<Option<ObjectID>>,
limit: impl Into<Option<usize>>,
) -> IotaRpcResult<DynamicFieldPage>
pub async fn get_dynamic_fields( &self, object_id: ObjectID, cursor: impl Into<Option<ObjectID>>, limit: impl Into<Option<usize>>, ) -> IotaRpcResult<DynamicFieldPage>
Get the dynamic fields owned by the given [ObjectID]. Results are paginated.
If the field is a dynamic field, this method returns the ID of the Field object, which contains both the name and the value.
If the field is a dynamic object field, it returns the ID of the Object, which is the value of the field.
§Examples
use std::str::FromStr;
use iota_sdk::{
IotaClientBuilder,
types::base_types::{IotaAddress, ObjectID},
};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let address = IotaAddress::from_str("0x0000....0000")?;
let owned_objects = iota
.read_api()
.get_owned_objects(address, None, None, None)
.await?;
// this code example assumes that there are previous owned objects
let object = owned_objects
.data
.get(0)
.expect(&format!("No owned objects for this address {}", address));
let object_data = object.data.as_ref().expect(&format!(
"No object data for this IotaObjectResponse {:?}",
object
));
let object_id = object_data.object_id;
let dynamic_fields = iota
.read_api()
.get_dynamic_fields(object_id, None, None)
.await?;
Ok(())
}Sourcepub async fn get_dynamic_field_object(
&self,
parent_object_id: ObjectID,
name: DynamicFieldName,
) -> IotaRpcResult<IotaObjectResponse>
pub async fn get_dynamic_field_object( &self, parent_object_id: ObjectID, name: DynamicFieldName, ) -> IotaRpcResult<IotaObjectResponse>
Get information for a specified dynamic field object by its parent object ID and field name.
Sourcepub async fn get_dynamic_field_object_v2(
&self,
parent_object_id: ObjectID,
name: DynamicFieldName,
options: impl Into<Option<IotaObjectDataOptions>>,
) -> IotaRpcResult<IotaObjectResponse>
pub async fn get_dynamic_field_object_v2( &self, parent_object_id: ObjectID, name: DynamicFieldName, options: impl Into<Option<IotaObjectDataOptions>>, ) -> IotaRpcResult<IotaObjectResponse>
Get information for a specified dynamic field object by its parent object ID and field name with options.
Sourcepub async fn try_get_parsed_past_object(
&self,
object_id: ObjectID,
version: SequenceNumber,
options: IotaObjectDataOptions,
) -> IotaRpcResult<IotaPastObjectResponse>
pub async fn try_get_parsed_past_object( &self, object_id: ObjectID, version: SequenceNumber, options: IotaObjectDataOptions, ) -> IotaRpcResult<IotaPastObjectResponse>
Get a parsed past object and version for the provided object ID.
An object’s version increases when the object is mutated, though it is not guaranteed that it increases always by 1. A past object can be used to understand how the object changed over time, i.e. what was the total balance at a specific version.
§Examples
use std::str::FromStr;
use iota_sdk::{
IotaClientBuilder,
rpc_types::IotaObjectDataOptions,
types::base_types::{IotaAddress, ObjectID},
};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let address = IotaAddress::from_str("0x0000....0000")?;
let owned_objects = iota
.read_api()
.get_owned_objects(address, None, None, None)
.await?;
// this code example assumes that there are previous owned objects
let object = owned_objects
.data
.get(0)
.expect(&format!("No owned objects for this address {}", address));
let object_data = object.data.as_ref().expect(&format!(
"No object data for this IotaObjectResponse {:?}",
object
));
let object_id = object_data.object_id;
let version = object_data.version;
let past_object = iota
.read_api()
.try_get_parsed_past_object(
object_id,
version,
IotaObjectDataOptions {
show_type: true,
show_owner: true,
show_previous_transaction: true,
show_display: true,
show_content: true,
show_bcs: true,
show_storage_rebate: true,
},
)
.await?;
Ok(())
}Sourcepub async fn try_multi_get_parsed_past_object(
&self,
past_objects: Vec<IotaGetPastObjectRequest>,
options: IotaObjectDataOptions,
) -> IotaRpcResult<Vec<IotaPastObjectResponse>>
pub async fn try_multi_get_parsed_past_object( &self, past_objects: Vec<IotaGetPastObjectRequest>, options: IotaObjectDataOptions, ) -> IotaRpcResult<Vec<IotaPastObjectResponse>>
Get a list of parsed past objects.
See Self::try_get_parsed_past_object for more details about past objects.
§Examples
use std::str::FromStr;
use iota_sdk::{
IotaClientBuilder,
rpc_types::{IotaGetPastObjectRequest, IotaObjectDataOptions},
types::base_types::{IotaAddress, ObjectID},
};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let address = IotaAddress::from_str("0x0000....0000")?;
let owned_objects = iota
.read_api()
.get_owned_objects(address, None, None, None)
.await?;
// this code example assumes that there are previous owned objects
let object = owned_objects
.data
.get(0)
.expect(&format!("No owned objects for this address {}", address));
let object_data = object.data.as_ref().expect(&format!(
"No object data for this IotaObjectResponse {:?}",
object
));
let object_id = object_data.object_id;
let version = object_data.version;
let past_object = iota
.read_api()
.try_get_parsed_past_object(
object_id,
version,
IotaObjectDataOptions {
show_type: true,
show_owner: true,
show_previous_transaction: true,
show_display: true,
show_content: true,
show_bcs: true,
show_storage_rebate: true,
},
)
.await?;
let past_object = past_object.into_object()?;
let multi_past_object = iota
.read_api()
.try_multi_get_parsed_past_object(
vec![IotaGetPastObjectRequest {
object_id: past_object.object_id,
version: past_object.version,
}],
IotaObjectDataOptions {
show_type: true,
show_owner: true,
show_previous_transaction: true,
show_display: true,
show_content: true,
show_bcs: true,
show_storage_rebate: true,
},
)
.await?;
Ok(())
}Sourcepub async fn get_object_with_options(
&self,
object_id: ObjectID,
options: IotaObjectDataOptions,
) -> IotaRpcResult<IotaObjectResponse>
pub async fn get_object_with_options( &self, object_id: ObjectID, options: IotaObjectDataOptions, ) -> IotaRpcResult<IotaObjectResponse>
Get an object by object ID with optional fields enabled by IotaObjectDataOptions.
§Examples
use std::str::FromStr;
use iota_sdk::{
IotaClientBuilder, rpc_types::IotaObjectDataOptions, types::base_types::IotaAddress,
};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let address = IotaAddress::from_str("0x0000....0000")?;
let owned_objects = iota
.read_api()
.get_owned_objects(address, None, None, None)
.await?;
// this code example assumes that there are previous owned objects
let object = owned_objects
.data
.get(0)
.expect(&format!("No owned objects for this address {}", address));
let object_data = object.data.as_ref().expect(&format!(
"No object data for this IotaObjectResponse {:?}",
object
));
let object_id = object_data.object_id;
let object = iota
.read_api()
.get_object_with_options(
object_id,
IotaObjectDataOptions {
show_type: true,
show_owner: true,
show_previous_transaction: true,
show_display: true,
show_content: true,
show_bcs: true,
show_storage_rebate: true,
},
)
.await?;
Ok(())
}Sourcepub async fn multi_get_object_with_options(
&self,
object_ids: Vec<ObjectID>,
options: IotaObjectDataOptions,
) -> IotaRpcResult<Vec<IotaObjectResponse>>
pub async fn multi_get_object_with_options( &self, object_ids: Vec<ObjectID>, options: IotaObjectDataOptions, ) -> IotaRpcResult<Vec<IotaObjectResponse>>
Get a list of objects by their object IDs with optional fields enabled by IotaObjectDataOptions.
§Examples
use std::str::FromStr;
use iota_sdk::{
IotaClientBuilder, rpc_types::IotaObjectDataOptions, types::base_types::IotaAddress,
};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let address = IotaAddress::from_str("0x0000....0000")?;
let owned_objects = iota
.read_api()
.get_owned_objects(address, None, None, None)
.await?;
// this code example assumes that there are previous owned objects
let object = owned_objects
.data
.get(0)
.expect(&format!("No owned objects for this address {}", address));
let object_data = object.data.as_ref().expect(&format!(
"No object data for this IotaObjectResponse {:?}",
object
));
let object_id = object_data.object_id;
let object_ids = vec![object_id]; // and other object ids
let object = iota
.read_api()
.multi_get_object_with_options(
object_ids,
IotaObjectDataOptions {
show_type: true,
show_owner: true,
show_previous_transaction: true,
show_display: true,
show_content: true,
show_bcs: true,
show_storage_rebate: true,
},
)
.await?;
Ok(())
}Sourcepub async fn get_move_object_bcs(
&self,
object_id: ObjectID,
) -> IotaRpcResult<Vec<u8>>
pub async fn get_move_object_bcs( &self, object_id: ObjectID, ) -> IotaRpcResult<Vec<u8>>
Get a [bcs] serialized object’s bytes by object ID.
Sourcepub async fn get_total_transaction_blocks(&self) -> IotaRpcResult<u64>
pub async fn get_total_transaction_blocks(&self) -> IotaRpcResult<u64>
Get the total number of transaction blocks known to server.
§Examples
use iota_sdk::IotaClientBuilder;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let iota = IotaClientBuilder::default().build_testnet().await?;
let total_transaction_blocks = iota.read_api().get_total_transaction_blocks().await?;
Ok(())
}Sourcepub async fn get_transaction_with_options(
&self,
digest: TransactionDigest,
options: IotaTransactionBlockResponseOptions,
) -> IotaRpcResult<IotaTransactionBlockResponse>
pub async fn get_transaction_with_options( &self, digest: TransactionDigest, options: IotaTransactionBlockResponseOptions, ) -> IotaRpcResult<IotaTransactionBlockResponse>
Get a transaction and its effects by its digest with optional fields enabled by IotaTransactionBlockResponseOptions.
Sourcepub async fn multi_get_transactions_with_options(
&self,
digests: Vec<TransactionDigest>,
options: IotaTransactionBlockResponseOptions,
) -> IotaRpcResult<Vec<IotaTransactionBlockResponse>>
pub async fn multi_get_transactions_with_options( &self, digests: Vec<TransactionDigest>, options: IotaTransactionBlockResponseOptions, ) -> IotaRpcResult<Vec<IotaTransactionBlockResponse>>
Get a list of transactions and their effects by their digests with optional fields enabled by IotaTransactionBlockResponseOptions.
Sourcepub async fn query_transaction_blocks(
&self,
query: IotaTransactionBlockResponseQuery,
cursor: impl Into<Option<TransactionDigest>>,
limit: impl Into<Option<usize>>,
descending_order: bool,
) -> IotaRpcResult<TransactionBlocksPage>
pub async fn query_transaction_blocks( &self, query: IotaTransactionBlockResponseQuery, cursor: impl Into<Option<TransactionDigest>>, limit: impl Into<Option<usize>>, descending_order: bool, ) -> IotaRpcResult<TransactionBlocksPage>
Get filtered transaction blocks information. Results are paginated.
Sourcepub async fn query_transaction_blocks_v2(
&self,
query: IotaTransactionBlockResponseQueryV2,
cursor: impl Into<Option<TransactionDigest>>,
limit: impl Into<Option<usize>>,
descending_order: bool,
) -> IotaRpcResult<TransactionBlocksPage>
pub async fn query_transaction_blocks_v2( &self, query: IotaTransactionBlockResponseQueryV2, cursor: impl Into<Option<TransactionDigest>>, limit: impl Into<Option<usize>>, descending_order: bool, ) -> IotaRpcResult<TransactionBlocksPage>
Get filtered transaction blocks information. Results are paginated.
Sourcepub async fn get_chain_identifier(&self) -> IotaRpcResult<String>
pub async fn get_chain_identifier(&self) -> IotaRpcResult<String>
Get the first four bytes of the chain’s genesis checkpoint digest in hex format.
Sourcepub async fn get_checkpoint(
&self,
id: CheckpointId,
) -> IotaRpcResult<Checkpoint>
pub async fn get_checkpoint( &self, id: CheckpointId, ) -> IotaRpcResult<Checkpoint>
Get a checkpoint by its ID.
Sourcepub async fn get_checkpoints(
&self,
cursor: impl Into<Option<BigInt<u64>>>,
limit: impl Into<Option<usize>>,
descending_order: bool,
) -> IotaRpcResult<CheckpointPage>
pub async fn get_checkpoints( &self, cursor: impl Into<Option<BigInt<u64>>>, limit: impl Into<Option<usize>>, descending_order: bool, ) -> IotaRpcResult<CheckpointPage>
Return a list of checkpoints. Results are paginated.
Sourcepub async fn get_latest_checkpoint_sequence_number(
&self,
) -> IotaRpcResult<CheckpointSequenceNumber>
pub async fn get_latest_checkpoint_sequence_number( &self, ) -> IotaRpcResult<CheckpointSequenceNumber>
Get the sequence number of the latest checkpoint that has been executed.
Sourcepub fn get_transactions_stream(
&self,
query: IotaTransactionBlockResponseQuery,
cursor: impl Into<Option<TransactionDigest>>,
descending_order: bool,
) -> impl Stream<Item = IotaTransactionBlockResponse> + '_
pub fn get_transactions_stream( &self, query: IotaTransactionBlockResponseQuery, cursor: impl Into<Option<TransactionDigest>>, descending_order: bool, ) -> impl Stream<Item = IotaTransactionBlockResponse> + '_
Get a stream of transactions.
Sourcepub fn get_transactions_stream_v2(
&self,
query: IotaTransactionBlockResponseQueryV2,
cursor: impl Into<Option<TransactionDigest>>,
descending_order: bool,
) -> impl Stream<Item = IotaTransactionBlockResponse> + '_
pub fn get_transactions_stream_v2( &self, query: IotaTransactionBlockResponseQueryV2, cursor: impl Into<Option<TransactionDigest>>, descending_order: bool, ) -> impl Stream<Item = IotaTransactionBlockResponse> + '_
Get a stream of transactions.
Sourcepub async fn subscribe_transaction(
&self,
filter: TransactionFilter,
) -> IotaRpcResult<impl Stream<Item = IotaRpcResult<IotaTransactionBlockEffects>>>
pub async fn subscribe_transaction( &self, filter: TransactionFilter, ) -> IotaRpcResult<impl Stream<Item = IotaRpcResult<IotaTransactionBlockEffects>>>
Subscribe to a stream of transactions.
This is only available through WebSockets.
Sourcepub async fn get_normalized_move_modules_by_package(
&self,
package: ObjectID,
) -> IotaRpcResult<BTreeMap<String, IotaMoveNormalizedModule>>
pub async fn get_normalized_move_modules_by_package( &self, package: ObjectID, ) -> IotaRpcResult<BTreeMap<String, IotaMoveNormalizedModule>>
Get move modules by package ID, keyed by name.
Sourcepub async fn get_reference_gas_price(&self) -> IotaRpcResult<u64>
pub async fn get_reference_gas_price(&self) -> IotaRpcResult<u64>
Get the reference gas price.
Sourcepub async fn dry_run_transaction_block(
&self,
tx: TransactionData,
) -> IotaRpcResult<DryRunTransactionBlockResponse>
pub async fn dry_run_transaction_block( &self, tx: TransactionData, ) -> IotaRpcResult<DryRunTransactionBlockResponse>
Dry run a transaction block given the provided transaction data.
This simulates running the transaction, including all standard checks, without actually running it. This is useful for estimating the gas fees of a transaction before executing it. You can also use it to identify any side-effects of a transaction before you execute it on the network.
Sourcepub async fn dev_inspect_transaction_block(
&self,
sender_address: IotaAddress,
tx: TransactionKind,
gas_price: impl Into<Option<BigInt<u64>>>,
epoch: impl Into<Option<BigInt<u64>>>,
additional_args: impl Into<Option<DevInspectArgs>>,
) -> IotaRpcResult<DevInspectResults>
pub async fn dev_inspect_transaction_block( &self, sender_address: IotaAddress, tx: TransactionKind, gas_price: impl Into<Option<BigInt<u64>>>, epoch: impl Into<Option<BigInt<u64>>>, additional_args: impl Into<Option<DevInspectArgs>>, ) -> IotaRpcResult<DevInspectResults>
Use this function to inspect the current state of the network by running a programmable transaction block without committing its effects on chain.
Unlike a dry run, this method will not validate whether the transaction block would succeed or fail under normal circumstances, e.g.:
- Transaction inputs are not checked for ownership (i.e. you can construct calls involving objects you do not own)
- Calls are not checked for visibility (you can call private functions on modules)
- Inputs of any type can be constructed and passed in, including coins and other objects that would usually need to be constructed with a move call
- Function returns do not need to be used, even if they do not have
drop
This method’s output includes a breakdown of results returned by every transaction in the block, as well as the transaction’s effects.
To run an accurate simulation of a transaction and understand whether it will successfully validate and run, use Self::dry_run_transaction_block instead.
Sourcepub async fn get_protocol_config(
&self,
version: impl Into<Option<BigInt<u64>>>,
) -> IotaRpcResult<ProtocolConfigResponse>
pub async fn get_protocol_config( &self, version: impl Into<Option<BigInt<u64>>>, ) -> IotaRpcResult<ProtocolConfigResponse>
Get the protocol config by version.
The version defaults to the current version.
Sourcepub async fn try_get_object_before_version(
&self,
object_id: ObjectID,
version: SequenceNumber,
) -> IotaRpcResult<IotaPastObjectResponse>
pub async fn try_get_object_before_version( &self, object_id: ObjectID, version: SequenceNumber, ) -> IotaRpcResult<IotaPastObjectResponse>
Get an object by ID before the given version.
Trait Implementations§
Source§impl DataReader for ReadApi
impl DataReader for ReadApi
Source§fn get_reference_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_reference_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the reference gas price as a u64 or an error otherwise
fn get_owned_objects<'life0, 'async_trait>(
&'life0 self,
address: IotaAddress,
object_type: StructTag,
cursor: Option<ObjectID>,
limit: Option<usize>,
options: IotaObjectDataOptions,
) -> Pin<Box<dyn Future<Output = Result<ObjectsPage, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_object_with_options<'life0, 'async_trait>(
&'life0 self,
object_id: ObjectID,
options: IotaObjectDataOptions,
) -> Pin<Box<dyn Future<Output = Result<IotaObjectResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for ReadApi
impl !RefUnwindSafe for ReadApi
impl Send for ReadApi
impl Sync for ReadApi
impl Unpin for ReadApi
impl UnsafeUnpin for ReadApi
impl !UnwindSafe for ReadApi
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§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.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§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.§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.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.