Skip to main content

MockAdminClient

Struct MockAdminClient 

Source
pub struct MockAdminClient { /* private fields */ }
Expand description

An in-memory Admin implementation for tests.

Corresponds to org.apache.kafka.clients.admin.MockAdminClient. The topic, cluster, and config methods are implemented through Tier 1 Phase 3; other RPCs will be added with their tiers. All futures returned are immediately resolved.

Implementations§

Source§

impl MockAdminClient

Source

pub fn create(num_brokers: i32) -> Result<Self, Error>

Creates a mock with num_brokers brokers (localhost:1000+id), controller = broker 0, default partitions 1 and default replication factor min(num_brokers, 3) — matching Java’s Builder defaults.

§Errors

Returns Error::local_illegal_argument when num_brokers is less than one. Java throws instead of producing a broker-less mock: its Builder.build() reads brokers.get(0) for the controller (MockAdminClient.java:210), which raises IndexOutOfBoundsException on the empty list numBrokers(0) leaves behind, and numBrokers(-1) raises from brokers.subList(0, -1) (:152) before build() is even reached (kafka a18251bae0). Reaching either requires an explicit numBrokers(n) call — Java’s Builder() constructor defaults to numBrokers(1) (:136) — so this rejects only a request the caller made deliberately.

This is a Result rather than a panic! because the argument is a caller-supplied count that the caller can trivially correct, which is CLAUDE.md §12.2 (“return a Result when Java code throws … even if unchecked but recoverable”) and not §10.1’s unrecoverable case. It also keeps crate::ffi::admin free of a panic that could unwind out of kafka_admin_MockAdminClient_new and abort the process.

Source

pub fn set_feature_levels( &self, feature_levels: HashMap<String, i16>, min_supported_feature_levels: HashMap<String, i16>, max_supported_feature_levels: HashMap<String, i16>, )

Seeds the finalized feature levels, along with the minimum and maximum supported feature levels, returned by describe_features and consulted by update_features.

Mirrors Java’s MockAdminClient.Builder.featureLevels / minSupportedFeatureLevels / maxSupportedFeatureLevels.

Source

pub fn update_beginning_offsets( &self, new_offsets: HashMap<TopicPartition, i64>, )

Seeds the beginning offsets returned by list_offsets for the given partitions.

Mirrors MockAdminClient.updateBeginningOffsets.

Source

pub fn update_end_offsets(&self, new_offsets: HashMap<TopicPartition, i64>)

Seeds the end offsets returned by list_offsets for the given partitions.

Mirrors MockAdminClient.updateEndOffsets.

Source

pub fn update_consumer_group_offsets( &self, new_offsets: HashMap<TopicPartition, i64>, )

Seeds the committed consumer-group offsets returned by list_consumer_group_offsets_with_group_specs for the given partitions.

Mirrors MockAdminClient.updateConsumerGroupOffsets.

Source

pub fn set_broker_log_dirs( &self, broker_id: i32, log_dirs: Vec<String>, ) -> Result<(), Error>

Overrides the log directories for a broker (mirrors Java’s Builder.brokerLogDirs). Useful for exercising multi-log-dir replica moves in tests.

§Errors

Returns Error::LocalIllegalArgument if broker_id is not one of the mock’s brokers. Java has no equivalent setter — Builder.brokerLogDirs installs the whole list up front — so this message has no Java counterpart; it exists because indexing brokerLogDirs out of range would otherwise panic.

Source

pub fn add_topic( &self, internal: bool, name: &str, partitions: Vec<TopicPartitionInfo>, configs: Option<BTreeMap<String, String>>, ) -> Result<(), Error>

Adds an existing topic to the mock’s state.

Mirrors MockAdminClient.addTopic.

§Errors

Returns Error::LocalIllegalArgument with Java’s message if the topic was already added, or if any partition names a broker the mock does not have as its leader, in its replica list, or in its ISR (MockAdminClient.java:296-309).

Source

pub fn mark_topic_for_deletion(&self, name: &str) -> Result<(), Error>

Marks a topic for deletion so describe_topics_with_topics treats it as absent.

Mirrors MockAdminClient.markTopicForDeletion.

§Errors

Returns Error::LocalIllegalArgument with Java’s message if the topic does not exist (MockAdminClient.java:328-330).

Source

pub fn timeout_next_request(&self, number_of_requests: i32)

Causes the next number_of_requests operations to fail with a timeout.

Trait Implementations§

Source§

impl Admin for MockAdminClient

Source§

fn describe_log_dirs_with_options( &self, brokers: &[i32], _options: DescribeLogDirsOptions, ) -> DescribeLogDirsResult

Mirrors MockAdminClient.describeLogDirs.

Source§

fn alter_replica_log_dirs_with_options( &self, replica_assignment: &HashMap<TopicPartitionReplica, String>, _options: AlterReplicaLogDirsOptions, ) -> AlterReplicaLogDirsResult

Mirrors MockAdminClient.alterReplicaLogDirs.

Source§

fn describe_replica_log_dirs_with_options( &self, replicas: &[TopicPartitionReplica], _options: DescribeReplicaLogDirsOptions, ) -> DescribeReplicaLogDirsResult

Mirrors MockAdminClient.describeReplicaLogDirs.

Source§

fn elect_leaders_with_options( &self, _election_type: ElectionType, _partitions: Option<HashSet<TopicPartition>>, _options: ElectLeadersOptions, ) -> ElectLeadersResult

Mirrors MockAdminClient.electLeaders, which throws UnsupportedOperationException("Not implemented yet") (MockAdminClient.java:797). Translated to a future failed with an “unsupported” Error (CLAUDE.md §12.1: no panic in public API).

Source§

fn alter_partition_reassignments_with_options( &self, reassignments: &HashMap<TopicPartition, Option<NewPartitionReassignment>>, _options: AlterPartitionReassignmentsOptions, ) -> AlterPartitionReassignmentsResult

Mirrors MockAdminClient.alterPartitionReassignments.

Source§

fn list_partition_reassignments_with_partitions_options( &self, partitions: Option<HashSet<TopicPartition>>, _options: ListPartitionReassignmentsOptions, ) -> ListPartitionReassignmentsResult

Mirrors MockAdminClient.listPartitionReassignments.

Java throws a RuntimeException from findPartitionReassignment when a stored reassignment names a topic that is no longer in allTopics (MockAdminClient.java:1186-1192). A synchronous throw is not representable in this signature, so the result’s single future is failed instead — the same accommodation list_offsets makes for a TimestampSpec (CLAUDE.md §12.1).

Source§

fn list_offsets_with_options( &self, topic_partition_offsets: &HashMap<TopicPartition, OffsetSpec>, _options: ListOffsetsOptions, ) -> ListOffsetsResult

Mirrors MockAdminClient.listOffsets.

Java throws UnsupportedOperationException for a TimestampSpec (MockAdminClient.java:1230); since a synchronous throw is not representable in this signature, the affected partition’s future is failed with an “unsupported” Error (CLAUDE.md §12.1).

Source§

fn create_topics_with_options( &self, new_topics: &[NewTopic], _options: CreateTopicsOptions, ) -> CreateTopicsResult

Create a batch of new topics. Read more
Source§

fn delete_topics_with_options( &self, topics: TopicCollection, _options: DeleteTopicsOptions, ) -> DeleteTopicsResult

Delete a batch of topics (by name or by id, per the TopicCollection). Read more
Source§

fn list_topics_with_options( &self, _options: ListTopicsOptions, ) -> ListTopicsResult

List the topics available in the cluster. Read more
Source§

fn describe_topics_with_topics_options( &self, topics: TopicCollection, _options: DescribeTopicsOptions, ) -> DescribeTopicsResult

Describe some topics in the cluster (by name or by id, per the TopicCollection). Read more
Source§

fn create_partitions_with_options( &self, new_partitions: &HashMap<String, NewPartitions>, _options: CreatePartitionsOptions, ) -> CreatePartitionsResult

Increase the number of partitions of the given topics. Read more
Source§

fn delete_records_with_options( &self, records_to_delete: &HashMap<TopicPartition, RecordsToDelete>, _options: DeleteRecordsOptions, ) -> DeleteRecordsResult

Delete records whose offset is smaller than the given offset of the corresponding partition. Read more
Source§

fn describe_producers_with_options( &self, partitions: &[TopicPartition], _options: DescribeProducersOptions, ) -> DescribeProducersResult

Describe the active producers for a set of topic partitions. Read more
Source§

fn abort_transaction_with_options( &self, spec: AbortTransactionSpec, _options: AbortTransactionOptions, ) -> AbortTransactionResult

Forcefully abort a transaction which is open on a topic partition. Read more
Source§

fn describe_transactions_with_options( &self, transactional_ids: &[String], _options: DescribeTransactionsOptions, ) -> DescribeTransactionsResult

List the transaction states of the given transactional ids. Read more
Source§

fn fence_producers_with_options( &self, transactional_ids: &[String], _options: FenceProducersOptions, ) -> FenceProducersResult

Fence out all active producers that use any of the provided transactional ids. Read more
Source§

fn list_transactions_with_options( &self, _options: ListTransactionsOptions, ) -> ListTransactionsResult

List the transactions in the cluster (fans out to all brokers). Read more
Source§

fn force_terminate_transaction_with_options( &self, transactional_id: &str, options: TerminateTransactionOptions, ) -> TerminateTransactionResult

Forcefully terminate an ongoing transaction for a given transactional id. Read more
Source§

fn describe_cluster_with_options( &self, _options: DescribeClusterOptions, ) -> DescribeClusterResult

Get information about the nodes in the cluster. Read more
Source§

fn describe_configs_with_options( &self, config_resources: &[ConfigResource], _options: DescribeConfigsOptions, ) -> DescribeConfigsResult

Get the configuration for the specified resources. Read more
Source§

fn incremental_alter_configs_with_options( &self, configs: &HashMap<ConfigResource, Vec<AlterConfigOp>>, _options: AlterConfigsOptions, ) -> AlterConfigsResult

Incrementally update the configuration for the specified resources. Read more
Source§

fn list_config_resources_with_options( &self, config_resource_types: &HashSet<Type>, _options: ListConfigResourcesOptions, ) -> ListConfigResourcesResult

List the config resources available in the cluster whose type is in the given set (an empty set means all supported types). Read more
Source§

fn list_groups_with_options( &self, _options: ListGroupsOptions, ) -> ListGroupsResult

List the groups available in the cluster. Read more
Source§

fn describe_consumer_groups_with_options( &self, group_ids: &[String], _options: DescribeConsumerGroupsOptions, ) -> DescribeConsumerGroupsResult

Describe some consumer groups in the cluster. Read more
Source§

fn describe_classic_groups_with_options( &self, group_ids: &[String], _options: DescribeClassicGroupsOptions, ) -> DescribeClassicGroupsResult

Describe some classic groups in the cluster. Read more
Source§

fn list_consumer_group_offsets_with_group_specs_options( &self, group_specs: &HashMap<String, ListConsumerGroupOffsetsSpec>, _options: ListConsumerGroupOffsetsOptions, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group specifications. Read more
Source§

fn alter_consumer_group_offsets_with_options( &self, _group_id: &str, _offsets: &HashMap<TopicPartition, OffsetAndMetadata>, _options: AlterConsumerGroupOffsetsOptions, ) -> AlterConsumerGroupOffsetsResult

Alter offsets for a consumer group. Read more
Source§

fn delete_consumer_group_offsets_with_options( &self, _group_id: &str, partitions: &HashSet<TopicPartition>, _options: DeleteConsumerGroupOffsetsOptions, ) -> DeleteConsumerGroupOffsetsResult

Delete offsets for a set of partitions in a consumer group. Read more
Source§

fn delete_consumer_groups_with_options( &self, group_ids: &[String], _options: DeleteConsumerGroupsOptions, ) -> DeleteConsumerGroupsResult

Delete consumer groups from the cluster. Read more
Source§

fn remove_members_from_consumer_group_with_options( &self, _group_id: &str, options: RemoveMembersFromConsumerGroupOptions, ) -> RemoveMembersFromConsumerGroupResult

Remove members from a consumer group by given member identities. Read more
Source§

fn create_acls_with_options( &self, acls: &[AclBinding], _options: CreateAclsOptions, ) -> CreateAclsResult

Create ACLs. Read more
Source§

fn describe_acls_with_options( &self, _filter: &AclBindingFilter, _options: DescribeAclsOptions, ) -> DescribeAclsResult

Describe ACLs matching the provided filter. Read more
Source§

fn delete_acls_with_options( &self, filters: &[AclBindingFilter], _options: DeleteAclsOptions, ) -> DeleteAclsResult

Delete ACLs matching the provided filters. Read more
Source§

fn describe_client_quotas_with_options( &self, _filter: &ClientQuotaFilter, _options: DescribeClientQuotasOptions, ) -> DescribeClientQuotasResult

Describe the client quotas matching the provided filter. Read more
Source§

fn alter_client_quotas_with_options( &self, entries: &[ClientQuotaAlteration], _options: AlterClientQuotasOptions, ) -> AlterClientQuotasResult

Alter the client quotas of one or more quota entities. Read more
Source§

fn describe_user_scram_credentials_with_users_options( &self, _users: &[String], _options: DescribeUserScramCredentialsOptions, ) -> DescribeUserScramCredentialsResult

Describe all SASL/SCRAM credentials for the given users, or all users if users is empty. Read more
Source§

fn alter_user_scram_credentials_with_options( &self, alterations: &[UserScramCredentialAlteration], _options: AlterUserScramCredentialsOptions, ) -> AlterUserScramCredentialsResult

Alter (upsert / delete) SASL/SCRAM credentials for one or more users. Read more
Source§

fn create_delegation_token_with_options( &self, options: CreateDelegationTokenOptions, ) -> CreateDelegationTokenResult

Create a delegation token. Read more
Source§

fn renew_delegation_token_with_options( &self, hmac: &[u8], options: RenewDelegationTokenOptions, ) -> RenewDelegationTokenResult

Renew a delegation token identified by its HMAC. Read more
Source§

fn expire_delegation_token_with_options( &self, hmac: &[u8], options: ExpireDelegationTokenOptions, ) -> ExpireDelegationTokenResult

Expire a delegation token identified by its HMAC. Read more
Source§

fn describe_delegation_token_with_options( &self, options: DescribeDelegationTokenOptions, ) -> DescribeDelegationTokenResult

Describe the delegation tokens matching the provided owners filter. Read more
Source§

fn describe_features_with_options( &self, _options: DescribeFeaturesOptions, ) -> DescribeFeaturesResult

Describe the finalized and supported features of the cluster. Read more
Source§

fn update_features_with_options( &self, feature_updates: &HashMap<String, FeatureUpdate>, options: UpdateFeaturesOptions, ) -> Result<UpdateFeaturesResult, Error>

Apply the given feature updates. Read more
Source§

fn close_with_timeout<'life0, 'async_trait>( &'life0 self, _timeout: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Close the admin client, awaiting the background task to finish in-flight work up to timeout. Read more
Source§

fn create_topics(&self, new_topics: &[NewTopic]) -> CreateTopicsResult

Create a batch of new topics. Read more
Source§

fn delete_topics(&self, topics: TopicCollection) -> DeleteTopicsResult

Delete a batch of topics (by name or by id, per the TopicCollection). Read more
Source§

fn list_topics(&self) -> ListTopicsResult

List the topics available in the cluster. Read more
Source§

fn describe_topics_with_topic_names( &self, topic_names: &[String], ) -> DescribeTopicsResult

Describe some topics in the cluster, by name. Read more
Source§

fn describe_topics_with_topic_names_options( &self, topic_names: &[String], options: DescribeTopicsOptions, ) -> DescribeTopicsResult

Describe some topics in the cluster, by name. Read more
Source§

fn describe_topics_with_topics( &self, topics: TopicCollection, ) -> DescribeTopicsResult

Describe some topics in the cluster (by name or by id, per the TopicCollection). Read more
Source§

fn create_partitions( &self, new_partitions: &HashMap<String, NewPartitions>, ) -> CreatePartitionsResult

Increase the number of partitions of the given topics. Read more
Source§

fn delete_records( &self, records_to_delete: &HashMap<TopicPartition, RecordsToDelete>, ) -> DeleteRecordsResult

Delete records whose offset is smaller than the given offset of the corresponding partition. Read more
Source§

fn describe_producers( &self, partitions: &[TopicPartition], ) -> DescribeProducersResult

Describe the active producers for a set of topic partitions. Read more
Source§

fn abort_transaction( &self, spec: AbortTransactionSpec, ) -> AbortTransactionResult

Forcefully abort a transaction which is open on a topic partition. Read more
Source§

fn describe_transactions( &self, transactional_ids: &[String], ) -> DescribeTransactionsResult

List the transaction states of the given transactional ids. Read more
Source§

fn fence_producers(&self, transactional_ids: &[String]) -> FenceProducersResult

Fence out all active producers that use any of the provided transactional ids. Read more
Source§

fn list_transactions(&self) -> ListTransactionsResult

List the transactions in the cluster (fans out to all brokers). Read more
Source§

fn force_terminate_transaction( &self, transactional_id: &str, ) -> TerminateTransactionResult

Forcefully terminate an ongoing transaction for a given transactional id. Read more
Source§

fn describe_cluster(&self) -> DescribeClusterResult

Get information about the nodes in the cluster. Read more
Source§

fn describe_configs( &self, config_resources: &[ConfigResource], ) -> DescribeConfigsResult

Get the configuration for the specified resources. Read more
Source§

fn incremental_alter_configs( &self, configs: &HashMap<ConfigResource, Vec<AlterConfigOp>>, ) -> AlterConfigsResult

Incrementally update the configuration for the specified resources. Read more
Source§

fn list_config_resources(&self) -> ListConfigResourcesResult

List all the config resources available in the cluster. Read more
Source§

fn describe_log_dirs(&self, brokers: &[i32]) -> DescribeLogDirsResult

Query the information of all log directories on the given set of brokers. Read more
Source§

fn alter_replica_log_dirs( &self, replica_assignment: &HashMap<TopicPartitionReplica, String>, ) -> AlterReplicaLogDirsResult

Change the log directory for the specified replicas. Read more
Source§

fn describe_replica_log_dirs( &self, replicas: &[TopicPartitionReplica], ) -> DescribeReplicaLogDirsResult

Query the replica log directory information for the specified replicas. Read more
Source§

fn elect_leaders( &self, election_type: ElectionType, partitions: Option<HashSet<TopicPartition>>, ) -> ElectLeadersResult

Elect a replica as leader for the given partitions, or for all partitions if partitions is None. Read more
Source§

fn alter_partition_reassignments( &self, reassignments: &HashMap<TopicPartition, Option<NewPartitionReassignment>>, ) -> AlterPartitionReassignmentsResult

Change the partition reassignments for the given partitions. Read more
Source§

fn list_partition_reassignments(&self) -> ListPartitionReassignmentsResult

List all the current partition reassignments. Read more
Source§

fn list_partition_reassignments_with_partitions( &self, partitions: HashSet<TopicPartition>, ) -> ListPartitionReassignmentsResult

List the current partition reassignments for the given partitions. Read more
Source§

fn list_partition_reassignments_with_options( &self, options: ListPartitionReassignmentsOptions, ) -> ListPartitionReassignmentsResult

List all the current partition reassignments, with options. Read more
Source§

fn list_offsets( &self, topic_partition_offsets: &HashMap<TopicPartition, OffsetSpec>, ) -> ListOffsetsResult

List the offsets for the given partitions and offset specifications. Read more
Source§

fn list_groups(&self) -> ListGroupsResult

List the groups available in the cluster. Read more
Source§

fn describe_consumer_groups( &self, group_ids: &[String], ) -> DescribeConsumerGroupsResult

Describe some consumer groups in the cluster. Read more
Source§

fn describe_classic_groups( &self, group_ids: &[String], ) -> DescribeClassicGroupsResult

Describe some classic groups in the cluster. Read more
Source§

fn list_consumer_group_offsets_with_group_id( &self, group_id: &str, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group. Read more
Source§

fn list_consumer_group_offsets_with_group_id_options( &self, group_id: &str, options: ListConsumerGroupOffsetsOptions, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group, with options. Read more
Source§

fn list_consumer_group_offsets_with_group_specs( &self, group_specs: &HashMap<String, ListConsumerGroupOffsetsSpec>, ) -> ListConsumerGroupOffsetsResult

List the consumer group offsets available in the cluster for the given group specifications. Read more
Source§

fn alter_consumer_group_offsets( &self, group_id: &str, offsets: &HashMap<TopicPartition, OffsetAndMetadata>, ) -> AlterConsumerGroupOffsetsResult

Alter offsets for a consumer group. Read more
Source§

fn delete_consumer_group_offsets( &self, group_id: &str, partitions: &HashSet<TopicPartition>, ) -> DeleteConsumerGroupOffsetsResult

Delete offsets for a set of partitions in a consumer group. Read more
Source§

fn delete_consumer_groups( &self, group_ids: &[String], ) -> DeleteConsumerGroupsResult

Delete consumer groups from the cluster. Read more
Source§

fn create_acls(&self, acls: &[AclBinding]) -> CreateAclsResult

Create ACLs. Read more
Source§

fn describe_acls(&self, filter: &AclBindingFilter) -> DescribeAclsResult

Describe ACLs matching the provided filter. Read more
Source§

fn delete_acls(&self, filters: &[AclBindingFilter]) -> DeleteAclsResult

Delete ACLs matching the provided filters. Read more
Source§

fn describe_client_quotas( &self, filter: &ClientQuotaFilter, ) -> DescribeClientQuotasResult

Describe the client quotas matching the provided filter. Read more
Source§

fn alter_client_quotas( &self, entries: &[ClientQuotaAlteration], ) -> AlterClientQuotasResult

Alter the client quotas of one or more quota entities. Read more
Source§

fn describe_user_scram_credentials(&self) -> DescribeUserScramCredentialsResult

Describe the SASL/SCRAM credentials for all users. Read more
Source§

fn describe_user_scram_credentials_with_users( &self, users: &[String], ) -> DescribeUserScramCredentialsResult

Describe the SASL/SCRAM credentials for the given users. Read more
Source§

fn alter_user_scram_credentials( &self, alterations: &[UserScramCredentialAlteration], ) -> AlterUserScramCredentialsResult

Alter (upsert / delete) SASL/SCRAM credentials for one or more users. Read more
Source§

fn create_delegation_token(&self) -> CreateDelegationTokenResult

Create a delegation token. Read more
Source§

fn renew_delegation_token(&self, hmac: &[u8]) -> RenewDelegationTokenResult

Renew a delegation token identified by its HMAC. Read more
Source§

fn expire_delegation_token(&self, hmac: &[u8]) -> ExpireDelegationTokenResult

Expire a delegation token identified by its HMAC. Read more
Source§

fn describe_delegation_token(&self) -> DescribeDelegationTokenResult

Describe the delegation tokens matching the provided owners filter. Read more
Source§

fn describe_features(&self) -> DescribeFeaturesResult

Describe the finalized and supported features of the cluster. Read more
Source§

fn update_features( &self, feature_updates: &HashMap<String, FeatureUpdate>, ) -> Result<UpdateFeaturesResult, Error>

Apply the given feature updates. Read more
Source§

fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Close the admin client, awaiting the background task to finish its in-flight work. Read more
Source§

impl Debug for MockAdminClient

Source§

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

Formats the value using the given formatter. Read more

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.
§

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

§

fn vzip(self) -> V