Struct mz_adapter::catalog::state::CatalogState

source ·
pub struct CatalogState {
Show 22 fields pub(super) database_by_name: BTreeMap<String, DatabaseId>, pub(super) database_by_id: BTreeMap<DatabaseId, Database>, pub(super) entry_by_id: BTreeMap<GlobalId, CatalogEntry>, pub(super) ambient_schemas_by_name: BTreeMap<String, SchemaId>, pub(super) ambient_schemas_by_id: BTreeMap<SchemaId, Schema>, pub(super) clusters_by_name: BTreeMap<String, ClusterId>, pub(super) clusters_by_id: BTreeMap<ClusterId, Cluster>, pub(super) roles_by_name: BTreeMap<String, RoleId>, pub(super) roles_by_id: BTreeMap<RoleId, Role>, pub(super) system_configuration: SystemVars, pub(super) default_privileges: DefaultPrivileges, pub(super) system_privileges: PrivilegeMap, pub(super) comments: CommentsMap, pub(super) storage_metadata: StorageMetadata, pub(super) temporary_schemas: BTreeMap<ConnectionId, Schema>, pub(super) config: CatalogConfig, pub(super) cluster_replica_sizes: ClusterReplicaSizeMap, pub(crate) availability_zones: Vec<String>, pub(super) egress_ips: Vec<Ipv4Addr>, pub(super) aws_principal_context: Option<AwsPrincipalContext>, pub(super) aws_privatelink_availability_zones: Option<BTreeSet<String>>, pub(super) http_host_name: Option<String>,
}
Expand description

The in-memory representation of the Catalog. This struct is not directly used to persist metadata to persistent storage. For persistent metadata see mz_catalog::durable::DurableCatalogState.

Serialize is implemented to create human readable dumps of the in-memory state, not for storing the contents of this struct on disk.

Fields§

§database_by_name: BTreeMap<String, DatabaseId>§database_by_id: BTreeMap<DatabaseId, Database>§entry_by_id: BTreeMap<GlobalId, CatalogEntry>§ambient_schemas_by_name: BTreeMap<String, SchemaId>§ambient_schemas_by_id: BTreeMap<SchemaId, Schema>§clusters_by_name: BTreeMap<String, ClusterId>§clusters_by_id: BTreeMap<ClusterId, Cluster>§roles_by_name: BTreeMap<String, RoleId>§roles_by_id: BTreeMap<RoleId, Role>§system_configuration: SystemVars§default_privileges: DefaultPrivileges§system_privileges: PrivilegeMap§comments: CommentsMap§storage_metadata: StorageMetadata§temporary_schemas: BTreeMap<ConnectionId, Schema>§config: CatalogConfig§cluster_replica_sizes: ClusterReplicaSizeMap§availability_zones: Vec<String>§egress_ips: Vec<Ipv4Addr>§aws_principal_context: Option<AwsPrincipalContext>§aws_privatelink_availability_zones: Option<BTreeSet<String>>§http_host_name: Option<String>

Implementations§

source§

impl CatalogState

source

pub(crate) fn pack_optimizer_notices<'a>( &self, updates: &mut Vec<BuiltinTableUpdate>, notices: impl Iterator<Item = &'a Arc<OptimizerNotice>>, diff: Diff, )

Pack a BuiltinTableUpdate with the given diff for each OptimizerNotice in notices into updates.

source§

impl CatalogState

source

pub fn resolve_builtin_table_updates( &self, builtin_table_update: Vec<BuiltinTableUpdate<&'static BuiltinTable>>, ) -> Vec<BuiltinTableUpdate<GlobalId>>

source

pub fn resolve_builtin_table_update( &self, _: BuiltinTableUpdate<&'static BuiltinTable>, ) -> BuiltinTableUpdate<GlobalId>

source

pub fn pack_depends_update( &self, depender: GlobalId, dependee: GlobalId, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub(super) fn pack_database_update( &self, database_id: &DatabaseId, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub(super) fn pack_schema_update( &self, database_spec: &ResolvedDatabaseSpecifier, schema_id: &SchemaId, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub(super) fn pack_role_update( &self, id: RoleId, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub(super) fn pack_role_members_update( &self, role_id: RoleId, member_id: RoleId, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub(super) fn pack_cluster_update( &self, name: &str, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub(super) fn pack_cluster_replica_update( &self, cluster_id: ClusterId, name: &str, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub(crate) fn pack_cluster_replica_status_update( &self, replica_id: ReplicaId, process_id: ProcessId, event: &ClusterReplicaProcessStatus, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub(super) fn pack_item_update( &self, id: GlobalId, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_history_retention_strategy_update( &self, id: GlobalId, cw: CompactionWindow, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

fn pack_table_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, privileges: Datum<'_>, diff: Diff, table: &Table, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_source_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, source_desc_name: &str, connection_id: Option<GlobalId>, envelope: Option<&str>, key_format: Option<&str>, value_format: Option<&str>, cluster_id: Option<&str>, owner_id: &RoleId, privileges: Datum<'_>, diff: Diff, create_sql: Option<&String>, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_postgres_source_update( &self, id: GlobalId, postgres: &PostgresSourceConnection<ReferencedConnection>, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_kafka_source_update( &self, id: GlobalId, kafka: &KafkaSourceConnection<ReferencedConnection>, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_postgres_source_tables_update( &self, id: GlobalId, schema_name: &str, table_name: &str, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_mysql_source_tables_update( &self, id: GlobalId, schema_name: &str, table_name: &str, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_connection_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, privileges: Datum<'_>, connection: &Connection, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub(crate) fn pack_ssh_tunnel_connection_update( &self, id: GlobalId, (public_key_primary, public_key_secondary): &(String, String), diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

fn pack_kafka_connection_update( &self, id: GlobalId, kafka: &KafkaConnection<ReferencedConnection>, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub fn pack_aws_connection_update( &self, connection_id: GlobalId, aws_config: &AwsConnection, diff: Diff, ) -> Result<BuiltinTableUpdate<&'static BuiltinTable>, Error>

source

fn pack_view_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, privileges: Datum<'_>, view: &View, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_materialized_view_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, privileges: Datum<'_>, mview: &MaterializedView, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_sink_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, sink: &Sink, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_index_update( &self, id: GlobalId, oid: u32, name: &str, owner_id: &RoleId, index: &Index, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_type_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, privileges: Datum<'_>, typ: &Type, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

fn pack_func_update( &self, id: GlobalId, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, func: &Func, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub fn pack_op_update( &self, operator: &str, func_impl_details: FuncImplCatalogDetails, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

fn pack_secret_update( &self, id: GlobalId, oid: u32, schema_id: &SchemaSpecifier, name: &str, owner_id: &RoleId, privileges: Datum<'_>, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub fn pack_audit_log_update( &self, event: &VersionedEvent, diff: Diff, ) -> Result<BuiltinTableUpdate<&'static BuiltinTable>, Error>

source

pub fn pack_storage_usage_update( &self, VersionedStorageUsage::V1: VersionedStorageUsage, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub fn pack_egress_ip_update( &self, ip: &Ipv4Addr, ) -> Result<BuiltinTableUpdate<&'static BuiltinTable>, Error>

source

pub fn pack_replica_metric_updates( &self, replica_id: ReplicaId, updates: &[ServiceProcessMetrics], diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub fn pack_all_replica_size_updates( &self, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source

pub fn pack_subscribe_update( &self, id: GlobalId, subscribe: &ActiveSubscribe, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub fn pack_session_update( &self, conn: &ConnMeta, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub fn pack_default_privileges_update( &self, default_privilege_object: &DefaultPrivilegeObject, grantee: &RoleId, acl_mode: &AclMode, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub fn pack_system_privileges_update( &self, privileges: MzAclItem, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

fn pack_privilege_array_row(&self, privileges: &PrivilegeMap) -> Row

source

pub fn pack_comment_update( &self, object_id: CommentObjectId, column_pos: Option<usize>, comment: &str, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub fn pack_webhook_source_update( &self, source_id: GlobalId, diff: Diff, ) -> BuiltinTableUpdate<&'static BuiltinTable>

source

pub fn pack_source_references_update( &self, source_references: &SourceReferences, diff: Diff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

source§

impl CatalogState

source

pub fn check_consistency(&self) -> Result<(), Box<CatalogInconsistencies>>

Checks the CatalogState to make sure we’re internally consistent.

source

fn check_internal_fields(&self) -> Result<(), Vec<InternalFieldsInconsistency>>

§Invariants:
  • Any fields within CatalogState that reference another field need to be kept in sync.

TODO(parkmycar): Check the reverse direction for these collections, e.g. all of the DatabaseIds in database_by_id also exist in database_by_name.

source

fn check_roles(&self) -> Result<(), Vec<RoleInconsistency>>

§Invariants:
  • All RoleIds referenced from other objects must exist.
source

fn check_comments(&self) -> Result<(), Vec<CommentInconsistency>>

§Invariants:
  • Comments should only reference existing objects.
  • A comment should only have a column position if it references a relation.
source

fn check_object_dependencies( &self, ) -> Result<(), Vec<ObjectDependencyInconsistency>>

§Invariants:
  • All of the objects in the “uses” collection of a CatalogEntry, should contain said CatalogEntry in their own “used_by” collection.
  • All of the objects in the “used_by” collection of a CatalogEntry, should contain said CatalogEntry in their own “uses” collection.
source

fn check_items(&self) -> Result<(), Vec<ItemInconsistency>>

§Invariants
  • Every schema that exists in the schemas_by_name map, also exists in schemas_by_id.
  • The name present in the schemas_by_name map matches the name in the associated Schema struct.
  • All items that exist in a Schema struct, also exist in the entries_by_id map.
  • Parsing the create_sql string from an Entry succeeds.
  • The result of parsing the create_sql must return a single Statement.
  • The names in the returned Statement, must match that of the parent struct.
  • The item from the parsed create_sql must be fully qualified.
source§

impl CatalogState

source

pub(crate) async fn apply_updates_for_bootstrap( &mut self, updates: Vec<StateUpdate>, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

Update in-memory catalog state from a list of updates made to the durable catalog state.

Returns builtin table updates corresponding to the changes to catalog state.

This is meant specifically for bootstrapping because it batches and applies builtin view additions separately from other update types.

source

pub(crate) fn apply_updates( &mut self, updates: Vec<StateUpdate>, ) -> Result<Vec<BuiltinTableUpdate<&'static BuiltinTable>>, CatalogError>

Update in-memory catalog state from a list of updates made to the durable catalog state.

Returns builtin table updates corresponding to the changes to catalog state.

source

fn apply_updates_inner( &mut self, updates: Vec<StateUpdate>, retractions: &mut InProgressRetractions, ) -> Result<Vec<BuiltinTableUpdate<&'static BuiltinTable>>, CatalogError>

source

fn apply_update( &mut self, kind: StateUpdateKind, diff: StateDiff, retractions: &mut InProgressRetractions, ) -> Result<(), CatalogError>

source

fn apply_role_update( &mut self, role: Role, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_database_update( &mut self, database: Database, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_schema_update( &mut self, schema: Schema, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_default_privilege_update( &mut self, default_privilege: DefaultPrivilege, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_system_privilege_update( &mut self, system_privilege: MzAclItem, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_system_configuration_update( &mut self, system_configuration: SystemConfiguration, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_cluster_update( &mut self, cluster: Cluster, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_introspection_source_index_update( &mut self, introspection_source_index: IntrospectionSourceIndex, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_cluster_replica_update( &mut self, cluster_replica: ClusterReplica, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_system_object_mapping_update( &mut self, system_object_mapping: SystemObjectMapping, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_temporary_item_update( &mut self, _: TemporaryItem, diff: StateDiff, retractions: &mut InProgressRetractions, )

source

fn apply_item_update( &mut self, item: Item, diff: StateDiff, retractions: &mut InProgressRetractions, ) -> Result<(), CatalogError>

source

fn apply_comment_update( &mut self, comment: Comment, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_source_references_update( &mut self, _source_references: SourceReferences, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_storage_collection_metadata_update( &mut self, storage_collection_metadata: StorageCollectionMetadata, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

fn apply_unfinalized_shard_update( &mut self, unfinalized_shard: UnfinalizedShard, diff: StateDiff, _retractions: &mut InProgressRetractions, )

source

pub(crate) fn generate_builtin_table_updates( &self, updates: Vec<StateUpdate>, ) -> Vec<BuiltinTableUpdate>

Generate a list of BuiltinTableUpdates that correspond to a list of updates made to the durable catalog.

source

fn generate_builtin_table_update( &self, kind: StateUpdateKind, diff: StateDiff, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

Generate a list of BuiltinTableUpdates that correspond to a single update made to the durable catalog.

source

fn get_entry_mut(&mut self, id: &GlobalId) -> &mut CatalogEntry

source

fn get_schema_mut( &mut self, database_spec: &ResolvedDatabaseSpecifier, schema_spec: &SchemaSpecifier, conn_id: &ConnectionId, ) -> &mut Schema

source

async fn parse_builtin_views( state: &mut CatalogState, builtin_views: Vec<(&Builtin<NameReference>, GlobalId)>, ) -> Vec<BuiltinTableUpdate<&'static BuiltinTable>>

Install builtin views to the catalog. This is its own function so that views can be optimized in parallel.

The implementation is similar to apply_updates_for_bootstrap and determines dependency problems by sniffing out specific errors and then retrying once those dependencies are complete. This doesn’t work for everything (casts, function implementations) so we also need to have a bucket for everything at the end. Additionally, because this executes in parellel, we must maintain a completed set otherwise races could result in orphaned views languishing in awaiting with nothing retriggering the attempt.

source

fn insert_entry(&mut self, entry: CatalogEntry)

Associates a name, GlobalId, and entry.

source

fn insert_item( &mut self, id: GlobalId, oid: u32, name: QualifiedItemName, item: CatalogItem, owner_id: RoleId, privileges: PrivilegeMap, )

Associates a name, GlobalId, and entry.

source

fn drop_item(&mut self, id: GlobalId) -> CatalogEntry

source

fn insert_introspection_source_index( &mut self, cluster_id: ClusterId, log: &'static BuiltinLog, index_id: GlobalId, oid: u32, )

source

fn insert_system_configuration( &mut self, name: &str, value: VarInput<'_>, ) -> Result<bool, Error>

Insert system configuration name with value.

Return a bool value indicating whether the configuration was modified by the call.

source

fn remove_system_configuration(&mut self, name: &str) -> Result<bool, Error>

Reset system configuration name.

Return a bool value indicating whether the configuration was modified by the call.

source§

impl CatalogState

source

fn set_system_configuration_default( &mut self, name: &str, value: VarInput<'_>, ) -> Result<(), Error>

Set the default value for name, which is the value it will be reset to.

source§

impl CatalogState

source

pub fn empty_test() -> Self

Returns an empty CatalogState that can be used in tests.

source

pub fn for_session<'a>(&'a self, session: &'a Session) -> ConnCatalog<'a>

source

pub fn for_sessionless_user(&self, role_id: RoleId) -> ConnCatalog<'_>

source

pub fn for_system_session(&self) -> ConnCatalog<'_>

source

pub fn dependent_indexes(&self, id: GlobalId) -> Vec<GlobalId>

Computes the IDs of any indexes that transitively depend on this catalog entry.

source

fn dependent_indexes_inner(&self, id: GlobalId, out: &mut Vec<GlobalId>)

source

pub fn transitive_uses( &self, id: GlobalId, ) -> impl Iterator<Item = GlobalId> + '_

Returns an iterator over the deduplicated identifiers of all objects this catalog entry transitively depends on (where “depends on” is meant in the sense of CatalogItem::uses, rather than CatalogItem::references).

source

pub fn introspection_dependencies(&self, id: GlobalId) -> Vec<GlobalId>

Computes the IDs of any log sources this catalog entry transitively depends on.

source

fn introspection_dependencies_inner( &self, id: GlobalId, out: &mut Vec<GlobalId>, )

source

pub(super) fn object_dependents( &self, object_ids: &Vec<ObjectId>, conn_id: &ConnectionId, seen: &mut BTreeSet<ObjectId>, ) -> Vec<ObjectId>

Returns all the IDs of all objects that depend on ids, including ids themselves.

The order is guaranteed to be in reverse dependency order, i.e. the leafs will appear earlier in the list than the roots. This is particularly userful for the order to drop objects.

source

fn cluster_dependents( &self, cluster_id: ClusterId, seen: &mut BTreeSet<ObjectId>, ) -> Vec<ObjectId>

Returns all the IDs of all objects that depend on cluster_id, including cluster_id itself.

The order is guaranteed to be in reverse dependency order, i.e. the leafs will appear earlier in the list than the roots. This is particularly userful for the order to drop objects.

source

pub(super) fn cluster_replica_dependents( &self, cluster_id: ClusterId, replica_id: ReplicaId, seen: &mut BTreeSet<ObjectId>, ) -> Vec<ObjectId>

Returns all the IDs of all objects that depend on replica_id, including replica_id itself.

The order is guaranteed to be in reverse dependency order, i.e. the leafs will appear earlier in the list than the roots. This is particularly userful for the order to drop objects.

source

fn database_dependents( &self, database_id: DatabaseId, conn_id: &ConnectionId, seen: &mut BTreeSet<ObjectId>, ) -> Vec<ObjectId>

Returns all the IDs of all objects that depend on database_id, including database_id itself.

The order is guaranteed to be in reverse dependency order, i.e. the leafs will appear earlier in the list than the roots. This is particularly userful for the order to drop objects.

source

fn schema_dependents( &self, database_spec: ResolvedDatabaseSpecifier, schema_spec: SchemaSpecifier, conn_id: &ConnectionId, seen: &mut BTreeSet<ObjectId>, ) -> Vec<ObjectId>

Returns all the IDs of all objects that depend on schema_id, including schema_id itself.

The order is guaranteed to be in reverse dependency order, i.e. the leafs will appear earlier in the list than the roots. This is particularly userful for the order to drop objects.

source

pub(super) fn item_dependents( &self, item_id: GlobalId, seen: &mut BTreeSet<ObjectId>, ) -> Vec<ObjectId>

Returns all the IDs of all objects that depend on item_id, including item_id itself.

The order is guaranteed to be in reverse dependency order, i.e. the leafs will appear earlier in the list than the roots. This is particularly userful for the order to drop objects.

source

fn is_stable(&self, id: GlobalId) -> bool

Indicates whether the indicated item is considered stable or not.

Only stable items can be used as dependencies of other catalog items.

source

pub(super) fn check_unstable_dependencies( &self, item: &CatalogItem, ) -> Result<(), Error>

source

pub fn resolve_full_name( &self, name: &QualifiedItemName, conn_id: Option<&ConnectionId>, ) -> FullItemName

source

pub(super) fn resolve_full_schema_name( &self, name: &QualifiedSchemaName, ) -> FullSchemaName

source

pub fn get_entry(&self, id: &GlobalId) -> &CatalogEntry

source

pub fn get_temp_items( &self, conn: &ConnectionId, ) -> impl Iterator<Item = ObjectId> + '_

source

pub(super) fn get_system_type(&self, name: &str) -> &CatalogEntry

Gets a type named name from exactly one of the system schemas.

§Panics
  • If name is not an entry in any system schema
  • If more than one system schema has an entry named name.
source

pub fn get_item_by_name( &self, name: &QualifiedItemName, conn_id: &ConnectionId, ) -> Option<&CatalogEntry>

source

pub fn get_type_by_name( &self, name: &QualifiedItemName, conn_id: &ConnectionId, ) -> Option<&CatalogEntry>

source

pub(super) fn find_available_name( &self, name: QualifiedItemName, conn_id: &ConnectionId, ) -> QualifiedItemName

source

pub fn try_get_entry(&self, id: &GlobalId) -> Option<&CatalogEntry>

source

pub(crate) fn get_cluster(&self, cluster_id: ClusterId) -> &Cluster

source

pub(super) fn try_get_cluster(&self, cluster_id: ClusterId) -> Option<&Cluster>

source

pub(super) fn try_get_role(&self, id: &RoleId) -> Option<&Role>

source

pub fn get_role(&self, id: &RoleId) -> &Role

source

pub fn get_roles(&self) -> impl Iterator<Item = &RoleId>

source

pub(super) fn try_get_role_by_name(&self, role_name: &str) -> Option<&Role>

source

pub(crate) fn collect_role_membership(&self, id: &RoleId) -> BTreeSet<RoleId>

source

pub fn try_get_webhook_url(&self, id: &GlobalId) -> Option<Url>

Returns the URL for POST-ing data to a webhook source, if id corresponds to a webhook source.

Note: Identifiers for the source, e.g. item name, are URL encoded.

source

pub(crate) fn deserialize_plan_with_enable_for_item_parsing( &mut self, create_sql: &str, force_if_exists_skip: bool, ) -> Result<(Plan, ResolvedIds), AdapterError>

Parses the given SQL string into a pair of Plan and a ResolvedIds.

This function will temporarily enable all “enable_for_item_parsing” feature flags. See CatalogState::with_enable_for_item_parsing for more details.

NOTE: While this method takes a &mut self, all mutations are temporary and restored to their original state before the method returns.

source

pub(crate) fn parse_plan( create_sql: &str, pcx: Option<&PlanContext>, catalog: &ConnCatalog<'_>, ) -> Result<(Plan, ResolvedIds), AdapterError>

Parses the given SQL string into a pair of Plan and a ResolvedIds.

source

pub(crate) fn deserialize_item( &self, create_sql: &str, ) -> Result<CatalogItem, AdapterError>

Parses the given SQL string into a pair of CatalogItem.

source

pub(crate) fn parse_item( &self, create_sql: &str, pcx: Option<&PlanContext>, is_retained_metrics_object: bool, custom_logical_compaction_window: Option<CompactionWindow>, ) -> Result<CatalogItem, AdapterError>

Parses the given SQL string into a CatalogItem.

source

pub fn with_enable_for_item_parsing<T>( &mut self, f: impl FnOnce(&mut Self) -> T, ) -> T

Execute function f on self, with all “enable_for_item_parsing” feature flags enabled. Calling this method will not permanently modify any system configuration variables.

WARNING: Any modifications made to the system configuration variables in f, will be lost.

source

pub fn get_indexes_on( &self, id: GlobalId, cluster: ClusterId, ) -> impl Iterator<Item = (GlobalId, &Index)>

Returns all indexes on the given object and cluster known in the catalog.

source

pub(super) fn get_database(&self, database_id: &DatabaseId) -> &Database

source

pub(super) fn try_get_cluster_replica( &self, id: ClusterId, replica_id: ReplicaId, ) -> Option<&ClusterReplica>

Gets a reference to the specified replica of the specified cluster.

Returns None if either the cluster or the replica does not exist.

source

pub(super) fn get_cluster_replica( &self, cluster_id: ClusterId, replica_id: ReplicaId, ) -> &ClusterReplica

Gets a reference to the specified replica of the specified cluster.

Panics if either the cluster or the replica does not exist.

source

pub fn get_system_configuration(&self, name: &str) -> Result<&dyn Var, Error>

Get system configuration name.

source

pub(super) fn parse_system_configuration( &self, name: &str, value: VarInput<'_>, ) -> Result<String, Error>

Parse system configuration name with value int.

Returns the parsed value as a string.

source

pub(super) fn resolve_schema_in_database( &self, database_spec: &ResolvedDatabaseSpecifier, schema_name: &str, conn_id: &ConnectionId, ) -> Result<&Schema, SqlCatalogError>

Gets the schema map for the database matching database_spec.

source

pub fn get_schema( &self, database_spec: &ResolvedDatabaseSpecifier, schema_spec: &SchemaSpecifier, conn_id: &ConnectionId, ) -> &Schema

source

pub(super) fn find_non_temp_schema(&self, schema_id: &SchemaId) -> &Schema

source

pub fn get_mz_catalog_schema_id(&self) -> SchemaId

source

pub fn get_mz_catalog_unstable_schema_id(&self) -> SchemaId

source

pub fn get_pg_catalog_schema_id(&self) -> SchemaId

source

pub fn get_information_schema_id(&self) -> SchemaId

source

pub fn get_mz_internal_schema_id(&self) -> SchemaId

source

pub fn get_mz_introspection_schema_id(&self) -> SchemaId

source

pub fn get_mz_unsafe_schema_id(&self) -> SchemaId

source

pub fn system_schema_ids(&self) -> impl Iterator<Item = SchemaId> + '_

source

pub fn is_system_schema_id(&self, id: SchemaId) -> bool

source

pub fn is_system_schema_specifier(&self, spec: SchemaSpecifier) -> bool

source

pub fn unstable_schema_ids(&self) -> impl Iterator<Item = SchemaId> + '_

source

pub fn is_unstable_schema_id(&self, id: SchemaId) -> bool

source

pub fn is_unstable_schema_specifier(&self, spec: SchemaSpecifier) -> bool

source

pub fn create_temporary_schema( &mut self, conn_id: &ConnectionId, owner_id: RoleId, ) -> Result<(), Error>

Creates a new schema in the Catalog for temporary items indicated by the TEMPORARY or TEMP keywords.

source

pub(crate) fn get_temporary_oids(&self) -> impl Iterator<Item = u32> + '_

Return all OIDs that are allocated to temporary objects.

source

pub fn resolve_builtin_table(&self, builtin: &'static BuiltinTable) -> GlobalId

Optimized lookup for a builtin table.

Panics if the builtin table doesn’t exist in the catalog.

source

pub fn resolve_builtin_log(&self, builtin: &'static BuiltinLog) -> GlobalId

Optimized lookup for a builtin log.

Panics if the builtin log doesn’t exist in the catalog.

source

pub fn resolve_builtin_source( &self, builtin: &'static BuiltinSource, ) -> GlobalId

Optimized lookup for a builtin storage collection.

Panics if the builtin storage collection doesn’t exist in the catalog.

source

pub fn resolve_builtin_object<T: TypeReference>( &self, builtin: &Builtin<T>, ) -> GlobalId

Optimized lookup for a builtin object.

Panics if the builtin object doesn’t exist in the catalog.

source

pub fn resolve_builtin_type_references( &self, builtin: &BuiltinType<NameReference>, ) -> BuiltinType<IdReference>

source

pub fn config(&self) -> &CatalogConfig

source

pub fn resolve_database( &self, database_name: &str, ) -> Result<&Database, SqlCatalogError>

source

pub fn resolve_schema( &self, current_database: Option<&DatabaseId>, database_name: Option<&str>, schema_name: &str, conn_id: &ConnectionId, ) -> Result<&Schema, SqlCatalogError>

source

pub fn resolve_system_schema(&self, name: &'static str) -> SchemaId

Optimized lookup for a system schema.

Panics if the system schema doesn’t exist in the catalog.

source

pub fn resolve_search_path( &self, session: &dyn SessionMetadata, ) -> Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>

source

pub fn effective_search_path( &self, search_path: &[(ResolvedDatabaseSpecifier, SchemaSpecifier)], include_temp_schema: bool, ) -> Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>

source

pub fn resolve_cluster(&self, name: &str) -> Result<&Cluster, SqlCatalogError>

source

pub fn resolve_builtin_cluster(&self, cluster: &BuiltinCluster) -> &Cluster

source

pub fn resolve_cluster_replica( &self, cluster_replica_name: &QualifiedReplica, ) -> Result<&ClusterReplica, SqlCatalogError>

source

pub fn resolve( &self, get_schema_entries: fn(_: &Schema) -> &BTreeMap<String, GlobalId>, current_database: Option<&DatabaseId>, search_path: &Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>, name: &PartialItemName, conn_id: &ConnectionId, err_gen: fn(_: String) -> SqlCatalogError, ) -> Result<&CatalogEntry, SqlCatalogError>

Resolves PartialItemName into a CatalogEntry.

If name does not specify a database, the current_database is used. If name does not specify a schema, then the schemas in search_path are searched in order.

source

pub fn resolve_entry( &self, current_database: Option<&DatabaseId>, search_path: &Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>, name: &PartialItemName, conn_id: &ConnectionId, ) -> Result<&CatalogEntry, SqlCatalogError>

Resolves name to a non-function CatalogEntry.

source

pub fn resolve_function( &self, current_database: Option<&DatabaseId>, search_path: &Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>, name: &PartialItemName, conn_id: &ConnectionId, ) -> Result<&CatalogEntry, SqlCatalogError>

Resolves name to a function CatalogEntry.

source

pub fn resolve_type( &self, current_database: Option<&DatabaseId>, search_path: &Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>, name: &PartialItemName, conn_id: &ConnectionId, ) -> Result<&CatalogEntry, SqlCatalogError>

Resolves name to a type CatalogEntry.

source

pub(super) fn get_comment_id(&self, object_id: ObjectId) -> CommentObjectId

For an ObjectId gets the corresponding CommentObjectId.

source

pub fn system_config(&self) -> &SystemVars

Return current system configuration.

source

pub fn dump( &self, unfinalized_shards: Option<BTreeSet<String>>, ) -> Result<String, Error>

Serializes the catalog’s in-memory state.

There are no guarantees about the format of the serialized state, except that the serialized state for two identical catalogs will compare identically.

Some consumers would like the ability to overwrite the unfinalized_shards catalog field, which they can accomplish by passing in a value of Some for the unfinalized_shards argument.

source

pub fn availability_zones(&self) -> &[String]

source

pub fn concretize_replica_location( &self, location: ReplicaLocation, allowed_sizes: &Vec<String>, allowed_availability_zones: Option<&[String]>, ) -> Result<ReplicaLocation, Error>

source

pub(crate) fn ensure_valid_replica_size( &self, allowed_sizes: &[String], size: &String, ) -> Result<(), Error>

source

pub fn ensure_not_reserved_role(&self, role_id: &RoleId) -> Result<(), Error>

source

pub fn ensure_grantable_role(&self, role_id: &RoleId) -> Result<(), Error>

source

pub fn ensure_not_system_role(&self, role_id: &RoleId) -> Result<(), Error>

source

pub fn ensure_not_predefined_role(&self, role_id: &RoleId) -> Result<(), Error>

source

pub(crate) fn add_to_audit_log( system_configuration: &SystemVars, oracle_write_ts: Timestamp, session: Option<&ConnMeta>, tx: &mut Transaction<'_>, audit_events: &mut Vec<VersionedEvent>, event_type: EventType, object_type: ObjectType, details: EventDetails, ) -> Result<(), Error>

source

pub(super) fn get_owner_id( &self, id: &ObjectId, conn_id: &ConnectionId, ) -> Option<RoleId>

source

pub(super) fn get_object_type(&self, object_id: &ObjectId) -> ObjectType

source

pub(super) fn get_system_object_type( &self, id: &SystemObjectId, ) -> SystemObjectType

source

pub fn storage_metadata(&self) -> &StorageMetadata

Returns a read-only view of the current StorageMetadata.

To write to this struct, you must use a catalog transaction.

source

pub fn source_compaction_windows( &self, ids: impl IntoIterator<Item = GlobalId>, ) -> BTreeMap<CompactionWindow, BTreeSet<GlobalId>>

For the Sources ids in ids, return the compaction windows for all ids and additional ids that propagate from them. Specifically, if ids contains a source, it and all of its subsources will be added to the result.

source

pub fn comment_id_to_global_id(id: &CommentObjectId) -> Option<GlobalId>

source

pub fn get_comment_id_entry( &self, id: &CommentObjectId, ) -> Option<&CatalogEntry>

source

pub fn comment_id_to_audit_log_name( &self, id: CommentObjectId, conn_id: &ConnectionId, ) -> String

Trait Implementations§

source§

impl Clone for CatalogState

source§

fn clone(&self) -> CatalogState

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl ConnectionResolver for CatalogState

source§

impl Debug for CatalogState

source§

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

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

impl Serialize for CatalogState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> AsAny for T
where T: Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

fn cast_into(self) -> U

Performs the cast.
source§

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

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<T> DynClone for T
where T: Clone,

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

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn from_ref(input: &T) -> T

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

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T, U> OverrideFrom<Option<&T>> for U
where U: OverrideFrom<T>,

source§

fn override_from(self, layer: &Option<&T>) -> U

Override the configuration represented by Self with values from the given layer.
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> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ProgressEventTimestamp for T
where T: Data + Debug + Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Upcasts this ProgressEventTimestamp to Any. Read more
source§

fn type_name(&self) -> &'static str

Returns the name of the concrete type of this object. Read more
source§

impl<P, R> ProtoType<R> for P
where R: RustType<P>,

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

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

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

impl<T> 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>,

§

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

§

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<T> Data for T
where T: Clone + 'static,