Skip to main content

Database

Struct Database 

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

A cloneable handle to one owned database. The connection capability retains both the worker and its matching database context; this handle has no second path to either.

Implementations§

Source§

impl Database

Source

pub async fn row_blob_ref( &self, table: &str, row_id: &str, ) -> Result<RowBlobRef, DbError>

Source§

impl Database

Source

pub fn open( path: &Path, synced_tables: Vec<SyncedTable>, blob_tombstone_grace: Duration, transfer_limits: TransferLimits, device_id: String, clock: ClockRef, coven_migration_policy: CovenMigrationPolicy, migrations: &[Migration], ) -> Result<Database, OpenError>

Open and own the connection at path.

Runs the host migration ladder and validates its final sync-routing contract in one transaction. A fresh database creates Coven metadata in that transaction; an initialized database commits only when the final contract exactly matches its pinned bytes. Then seeds the register clock from on-disk rows. The _updated_at stamper remains inside the database boundary and is used by every synced-row write.

Source

pub fn open_initialized_store( path: &Path, install: &VerifiedSnapshotBootstrapInstall, synced_tables: Vec<SyncedTable>, blob_tombstone_grace: Duration, transfer_limits: TransferLimits, device_id: String, clock: ClockRef, coven_migration_policy: CovenMigrationPolicy, migrations: &[Migration], ) -> Result<Database, OpenError>

Source

pub fn open_in_store_dir_for_test( path: &Path, store_dir: StoreDir, synced_tables: Vec<SyncedTable>, blob_tombstone_grace: Duration, transfer_limits: TransferLimits, device_id: String, clock: ClockRef, coven_migration_policy: CovenMigrationPolicy, migrations: &[Migration], ) -> Result<Database, OpenError>

Source

pub fn open_with_hlc_in_store_dir_for_test( path: &Path, store_dir: StoreDir, synced_tables: Vec<SyncedTable>, blob_tombstone_grace: Duration, transfer_limits: TransferLimits, hlc: Arc<Hlc>, coven_migration_policy: CovenMigrationPolicy, migrations: &[Migration], ) -> Result<Database, OpenError>

Source

pub fn open_read_only( path: &Path, synced_tables: Vec<SyncedTable>, blob_tombstone_grace: Duration, transfer_limits: TransferLimits, device_id: String, clock: ClockRef, migrations: &[Migration], ) -> Result<Database, OpenError>

Open the store at path read-only for a same-store secondary reader (e.g. a separate process reading while another holds the writer open).

Distinct from Database::open in three ways, all so the reader never mutates shared state a concurrent writer owns: the connection is SQLITE_OPEN_READONLY; no migration ladder or bookkeeping DDL runs (it opens against the schema the writer left, and refuses one newer than this binary knows — the writer’s SchemaTooNew policy); and it returns no stamper, because a reader mints no _updated_at. Reads are safe across processes because a read-only connection can coexist with the writer and observes commits after each read transaction ends.

The caller takes no store open-lock for a read-only open: the exclusive advisory lock guards against a second writer, and a read-only connection cannot write, so multiple readers can coexist with one writer.

Source

pub fn open_with_hlc( path: &Path, synced_tables: Vec<SyncedTable>, blob_tombstone_grace: Duration, transfer_limits: TransferLimits, hlc: Arc<Hlc>, coven_migration_policy: CovenMigrationPolicy, migrations: &[Migration], ) -> Result<Database, OpenError>

Open with a caller-supplied register clock instead of a fresh system-wall-clock one. Lets a test inject an Hlc over a controlled wall clock to exercise the skew/restart-seeding guarantees, sharing the production open path (migration, seed, session) so the test drives the real unit.

Source

pub fn schema_version(&self) -> u32

Source

pub fn sync_routing_hash(&self) -> ObjectHash

Source

pub fn receive_wall_ms(&self) -> u64

The receiver’s current wall-clock millis, read from this database’s register clock. The pull reads it once and passes it down to bound an incoming _updated_at’s physical component (a grossly-future stamp must not win last-writer-wins or ratchet the clock).

Source§

impl Database

Source

pub async fn get_protocol_state( &self, key: &str, ) -> Result<Option<String>, DbError>

Source

pub async fn set_protocol_state( &self, key: &str, value: &str, ) -> Result<(), DbError>

Source

pub async fn delete_protocol_state(&self, key: &str) -> Result<(), DbError>

Source§

impl Database

Source

pub fn sequence_from_sqlite(device_id: &str, value: i64) -> Result<u64, DbError>

Source

pub fn sequence_to_sqlite(device_id: &str, value: u64) -> Result<i64, DbError>

Source§

impl Database

Source

pub async fn remove_store_protocol_root_for_test(&self)

Source

pub async fn remove_retained_replay_baseline_for_test(&self)

Source

pub async fn tamper_retained_recovery_registration_for_test( &self, reference: &StoreBatchCommitRef, tamper: RetainedRegistrationTamper, )

Source

pub async fn execute_test_sql(&self, sql: &str)

Source

pub async fn execute_test_host_write(&self, sql: &str)

Source

pub async fn add_local_photo_for_test( &self, note_id: &str, photo_id: &str, cloud_path: &str, bytes: &[u8], source: &Path, )

Source

pub async fn insert_local_upload_rows_for_test( &self, root_id: &str, rows: &[(&str, &[u8])], ) -> Result<(), DbError>

Source

pub async fn seed_stuck_blob_upload_for_test( &self, created_at: &str, ) -> Result<(), DbError>

Source

pub async fn query_test_text(&self, sql: &str) -> String

Source

pub async fn test_row_exists(&self, sql: &str) -> bool

Source

pub async fn capture_test_changeset(&self, statements: &[&str]) -> Vec<u8>

Source

pub async fn capture_test_changeset_for_tables( &self, tables: &[&str], sql: &str, ) -> Vec<u8>

Source

pub async fn try_apply_test_changeset( &self, bytes: &[u8], ) -> Result<(), DbError>

Source

pub async fn apply_test_changeset(&self, bytes: &[u8])

Source

pub async fn apply_test_changeset_reporting_foreign_key_violations( &self, bytes: &[u8], ) -> Result<bool, DbError>

Source

pub async fn plant_blob_row_for_test( &self, blob_id: &str, remote: bool, bytes: &[u8], )

Source

pub async fn plant_blob_row_with_facts_for_test( &self, blob_id: &str, remote: bool, size: u64, hash: Option<&str>, )

Source

pub async fn set_blob_remote_for_test(&self, blob_id: &str, remote: bool)

Source

pub async fn run_scoped_host_write_for_test(&self, sql: String)

Source

pub async fn scoped_routing_state_for_test( &self, row_id: &str, ) -> ScopedRoutingStateForTest

Source

pub async fn circle_control_activation_count_for_test( &self, circle_id: CircleId, ) -> i64

Source

pub async fn row_blob_binding_count_for_test(&self, row_id: &str) -> i64

Source

pub async fn bind_circle_row_blob_for_test(&self, row_id: &str)

Source

pub async fn table_has_rows_for_test( &self, table: DatabaseTestTable, ) -> Result<bool, DbError>

Source

pub async fn store_partition_changesets_for_test( &self, ) -> Result<Vec<Vec<u8>>, DbError>

Source

pub async fn has_store_partition_for_test(&self) -> Result<bool, DbError>

Source

pub async fn delete_make_remote_intent_for_test( &self, root_table: &str, root_id: &str, ) -> Result<(), DbError>

Source

pub async fn make_remote_intent_exists_for_test( &self, root_table: &str, root_id: &str, ) -> Result<bool, DbError>

Source

pub async fn published_blob_drop_intent_exists_for_test( &self, blob_id: &str, ) -> Result<bool, DbError>

Source

pub async fn insert_published_blob_drop_intent_for_test( &self, sequence: u64, namespace: &str, blob_id: &str, bytes: &[u8], locator_hash: ObjectHash, disposition: DeferredLocalBlobDisposition, ) -> Result<(), DbError>

Source

pub async fn remote_object_for_test( &self, object: ExactObjectRef, ) -> Result<RemoteObjectRecord, DbError>

Source

pub async fn retained_store_package_pin_for_test( &self, commit: &StoreBatchCommitRef, ) -> Result<(RetainedReplayOwner, StorePackageRef, RemoteObjectRecord), DbError>

Source

pub async fn remote_objects_for_test( &self, ) -> Result<Vec<RemoteObjectRecord>, DbError>

Source

pub async fn remote_object_exists_for_test( &self, object: ExactObjectRef, ) -> Result<bool, DbError>

Source

pub async fn remote_object_id_exists_for_test( &self, object_id: ObjectHash, ) -> Result<bool, DbError>

Source

pub async fn replace_remote_object_for_test( &self, object: ExactObjectRef, remote: RemoteObjectRecord, ) -> Result<(), DbError>

Source

pub async fn delete_remote_object_for_test( &self, object: ExactObjectRef, ) -> Result<(), DbError>

Source

pub async fn enqueue_blob_delete_for_test( &self, stored: &StoredBlobRef, created_at: &str, ) -> Result<(), DbError>

Source

pub async fn delete_outbox_attempt_for_test( &self, id: i64, ) -> Result<Option<OutboxAttempt>, DbError>

Source

pub async fn insert_local_blob_row_for_test( &self, root_id: &str, row_id: &str, blob_id: &str, cloud_path: Option<&str>, bytes: &[u8], ) -> Result<(), HostWriteError<DbError>>

Source

pub async fn capture_circle_document_for_test( &self, row_id: &str, circle_id: CircleId, stamp: &str, ) -> Result<WriteId, HostWriteError<DbError>>

Source

pub async fn circle_document_present_for_test( &self, row_id: &str, ) -> Result<bool, DbError>

Source

pub async fn local_store_device_id_for_test( &self, ) -> Result<StoreDeviceId, DbError>

Source

pub async fn capture_document_for_test( &self, row_id: &str, audience: Option<CircleId>, stamp: &str, ) -> Result<WriteId, HostWriteError<DbError>>

Source

pub async fn capture_document_with_file_for_test( &self, document_id: &str, file_id: &str, audience: Option<CircleId>, bytes: &[u8], stamp: &str, ) -> Result<WriteId, HostWriteError<DbError>>

Source

pub async fn document_file_stamp_for_test( &self, file_id: &str, ) -> Result<String, DbError>

Source

pub async fn release_retained_replay_ownership_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn insert_browsable_blob_row_for_test( &self, blob_id: &str, cloud_path: &str, bytes: &[u8], ) -> Result<(), DbError>

Source

pub async fn bind_stored_blob_to_row_for_test( &self, stored: &StoredBlobRef, table: &str, id: &str, owner: StoreBatchCommitRef, ) -> Result<(), DbError>

Source

pub async fn store_package_is_retained_for_replay_for_test( &self, package: StorePackageRef, activation: StoreBatchCommitRef, ) -> Result<bool, DbError>

Source

pub async fn circle_state_counts_for_test( &self, circle_id: CircleId, ) -> Result<(i64, i64, i64), DbError>

Source

pub async fn upload_outbox_attempt_for_test( &self, row_id: &str, ) -> Result<Option<OutboxAttempt>, DbError>

Source

pub async fn corrupt_upload_outbox_attempt_time_for_test( &self, id: i64, ) -> Result<(), DbError>

Source

pub async fn corrupt_delete_outbox_attempt_time_for_test( &self, id: i64, ) -> Result<(), DbError>

Source

pub async fn enqueue_blob_upload_with_retention_for_test( &self, root_table: &str, root_id: &str, row: RowBlobRef, source_path: PathBuf, retain_pinned: bool, created_at: &str, ) -> Result<(), DbError>

Source

pub async fn roll_back_blob_upload_for_test( &self, root_table: &str, root_id: &str, row: RowBlobRef, source_path: PathBuf, created_at: &str, ) -> Result<(), DbError>

Source

pub async fn published_blob_drop_intent_count_for_test( &self, sequence: i64, namespace: &str, blob_id: &str, ) -> Result<i64, DbError>

Source

pub async fn first_published_blob_drop_intent_for_test( &self, namespace: &str, blob_id: &str, ) -> Result<(i64, DeferredLocalBlobDisposition), DbError>

Source

pub async fn scoped_store_state_counts_for_test( &self, ) -> Result<[i64; 4], DbError>

Source

pub async fn install_make_local_commit_failure_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn store_device_registration_activation_for_test( &self, device_id: &str, ) -> Result<StoreDeviceRegistrationActivation, DbError>

Source

pub async fn latest_published_store_snapshot_for_test( &self, ) -> Result<(i64, Vec<u8>), DbError>

Source

pub async fn latest_published_store_snapshot_bytes_for_test( &self, ) -> Result<Vec<u8>, DbError>

Source

pub async fn materialized_commits_without_device_state_count_for_test( &self, ) -> Result<i64, DbError>

Source

pub async fn store_device_state_snapshot_refs_for_test( &self, ) -> Result<Vec<StoreBatchCommitRef>, DbError>

Source

pub async fn restored_row_graph_counts_for_test( &self, ) -> Result<(i64, i64, i64, i64), DbError>

Source§

impl Database

Source

pub async fn install_malformed_store_root_authority_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn install_exact_store_root_authority_for_test( &self, reference: StoreRootRef, bytes: Vec<u8>, ) -> Result<(), DbError>

Source

pub async fn seed_existing_store_write_for_test( &self, changeset_hash: String, ) -> Result<(), DbError>

Source

pub async fn host_identity_rollback_state_for_test( &self, ) -> Result<(i64, Vec<String>), DbError>

Source

pub async fn seed_thing_for_test(&self, row_id: String) -> Result<(), DbError>

Source

pub async fn store_write_hashes_for_test(&self) -> Result<Vec<String>, DbError>

Source

pub async fn thing_and_store_write_state_for_test( &self, ) -> Result<((String, String), Vec<String>), DbError>

Source

pub async fn make_remote_retain_pinned_column_for_test( &self, ) -> Result<Option<(i64, Option<String>)>, DbError>

Source

pub async fn vacuum_into_for_test( &self, destination: String, ) -> Result<(), DbError>

Source

pub async fn table_row_count_for_test( &self, table: DatabaseTestTable, ) -> Result<i64, DbError>

Source

pub async fn install_blob_binding_for_test( &self, object_id: String, state: String, locator_hash: String, table: &str, row_id: &str, column: &str, row_stamp: &str, audience: String, ) -> Result<(), DbError>

Source

pub async fn protocol_state_prefix_count_for_test( &self, prefix: &str, ) -> Result<i64, DbError>

Source

pub async fn exact_row_blob_locator_count_for_test( &self, table: &str, row_id: &str, column: &str, stamp: &str, ) -> Result<i64, DbError>

Source

pub async fn exact_upload_outbox_count_for_test( &self, table: &str, row_id: &str, column: &str, stamp: &str, ) -> Result<i64, DbError>

Source

pub async fn install_outbound_preparation_failure_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn remove_outbound_preparation_failure_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn staged_circle_acknowledgement_object_for_test( &self, ) -> Result<PreparedExactObject, DbError>

Source

pub async fn install_owner_anchor_failure_for_test(&self) -> Result<(), DbError>

Source

pub async fn install_replay_image_corruption_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn remove_owner_anchor_failure_for_test(&self) -> Result<(), DbError>

Source

pub async fn corrupt_store_device_registration_bytes_for_test( &self, registration: StoreDeviceRegistrationRef, ) -> Result<(), DbError>

Source

pub async fn validate_retained_merge_replay_for_test( &self, root: StoreRootRef, ) -> Result<(), DbError>

Source

pub async fn replace_retained_merge_input_for_test( &self, stream_id: String, canonical_input: Vec<u8>, ) -> Result<(), DbError>

Source

pub async fn insert_invalid_materialized_commit_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn retained_materialization_input_for_test( &self, stream_id: String, sequence: u64, ) -> Result<(Vec<u8>, String, String), DbError>

Source

pub async fn retained_canonical_input_for_test( &self, stream_id: String, sequence: u64, ) -> Result<Vec<u8>, DbError>

Source

pub async fn corrupt_retained_materialization_input_for_test( &self, stream_id: String, sequence: u64, ) -> Result<(), DbError>

Source

pub async fn insert_retained_replay_object_for_test( &self, owner: RetainedReplayOwner, object: ExactObjectRef, ) -> Result<(), DbError>

Source

pub async fn retained_merge_input_hash_for_test( &self, stream_id: String, sequence: u64, ) -> Result<ObjectHash, DbError>

Source

pub async fn materialized_commit_exists_for_test( &self, stream_id: String, sequence: u64, ) -> Result<bool, DbError>

Source

pub async fn remove_materialized_note_for_test( &self, stream_id: String, sequence: u64, row_id: String, ) -> Result<(), DbError>

Source

pub async fn write_retains_prepared_for_test( &self, write_id: WriteId, ) -> Result<bool, DbError>

Source

pub async fn install_outbound_completion_failure_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn remove_outbound_completion_failure_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn replace_store_root_hash_for_test( &self, value: Option<String>, ) -> Result<(), DbError>

Source

pub async fn delete_device_state_snapshot_for_test( &self, commit_ref: String, ) -> Result<(), DbError>

Source

pub async fn delete_retained_materialization_without_foreign_keys_for_test( &self, reference: StoreBatchCommitRef, ) -> Result<(), DbError>

Source

pub async fn replace_device_state_snapshot_for_test( &self, commit_ref: String, state: ResolvedStoreDeviceState, ) -> Result<(), DbError>

Source

pub async fn forge_device_in_state_snapshots_for_test( &self, forged_device_id: StoreDeviceId, ) -> Result<(), DbError>

Source

pub async fn delete_exact_materialized_commit_for_test( &self, reference: StoreBatchCommitRef, ) -> Result<(), DbError>

Source

pub async fn install_protocol_state_key_insert_failure_for_test( &self, rejected_key: String, ) -> Result<(), DbError>

Source

pub async fn install_protocol_state_insert_failure_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn apply_changeset_for_test( &self, bytes: Vec<u8>, tables: Vec<SyncedTable>, receiver_wall_ms: u64, ) -> Result<ApplyResult, DbError>

Source

pub async fn apply_changesets_atomically_for_test( &self, changesets: Vec<Vec<u8>>, tables: Vec<SyncedTable>, receiver_wall_ms: u64, ) -> Result<(Vec<ApplyResult>, bool), DbError>

Source

pub async fn store_write_partitions_in_audience_order_for_test( &self, ) -> Result<Vec<(String, Option<String>, Vec<u8>)>, DbError>

Source

pub async fn first_store_write_partition_hash_for_test( &self, write_id: WriteId, ) -> Result<ObjectHash, DbError>

Source

pub async fn plant_control_on_local_partition_for_test( &self, ) -> Result<(), DbError>

Source

pub async fn store_write_row_for_test( &self, write_id: WriteId, ) -> Result<(String, Vec<u8>), DbError>

Source

pub async fn row_and_private_routing_presence_for_test( &self, table: &str, row_id: &str, ) -> Result<(bool, bool, bool), DbError>

Source

pub async fn store_write_row_and_only_partition_for_test( &self, write_id: WriteId, ) -> Result<((String, Vec<u8>), (String, Option<String>, Vec<u8>)), DbError>

Source

pub async fn store_write_partition_changesets_for_test( &self, write_id: WriteId, ) -> Result<Vec<(String, Vec<u8>)>, DbError>

Source

pub async fn apply_coven_routing_schema_for_test(&self) -> Result<(), DbError>

Source

pub async fn circle_current_state_for_test( &self, circle_id: CircleId, ) -> Result<Option<CircleCurrentState>, DbError>

Source

pub async fn record_verified_circle_activations_for_test( &self, commit: VerifiedStoreBatchCommit, activations: Vec<VerifiedCircleReference>, ) -> Result<(), DbError>

Source

pub async fn circle_access_owner_for_test( &self, circle_id: CircleId, ) -> Result<String, DbError>

Source

pub async fn clear_circle_access_cache_for_test(&self) -> Result<(), DbError>

Source

pub async fn replace_circle_operation_prepared_for_test( &self, operation_id: CircleOperationId, substitute: CircleOperationJournal, ) -> Result<(), DbError>

Source

pub async fn circle_state_table_counts_for_test( &self, ) -> Result<(i64, i64), DbError>

Source

pub async fn document_circle_route_for_test( &self, row_id: &str, ) -> Result<(String, String, String), DbError>

Source

pub async fn corrupt_live_document_route_id_for_test( &self, row_id: &str, ) -> Result<(), DbError>

Source

pub async fn materialization_graph_counts_for_test( &self, ) -> Result<(i64, i64, i64), DbError>

Source

pub async fn persist_exact_remote_object_for_test( &self, remote: ClosedRemoteObject, context: String, ) -> Result<(), DbError>

Source

pub async fn remote_object_by_id_for_test( &self, object_id: ObjectHash, ) -> Result<RemoteObjectRecord, DbError>

Source

pub async fn install_reclaimed_store_package_for_test( &self, operation: DurableStoreReclaimOperation, package: ReclaimedStorePackage, ) -> Result<(), DbError>

Source

pub async fn reclaimed_store_package_for_test( &self, object_id: ObjectHash, ) -> Result<Option<ReclaimedStorePackage>, DbError>

Source

pub async fn record_reclaimed_store_package_for_test( &self, package: ReclaimedStorePackage, ) -> Result<(), DbError>

Source

pub async fn scoped_routing_counts_for_test( &self, circle_id: CircleId, ) -> Result<(i64, i64), DbError>

Source

pub async fn cleanup_intent_copy_identities_for_test( &self, ) -> Result<Vec<String>, DbError>

Source

pub async fn insert_cleanup_intent_for_test( &self, namespace: String, blob_id: String, copy_identity: String, ) -> Result<(), DbError>

Source

pub async fn seed_distinct_cleanup_bindings_for_test( &self, removed_locator: ObjectHash, live_locator: ObjectHash, removed_object: ObjectHash, live_object: ObjectHash, ) -> Result<(), DbError>

Source§

impl Database

Source

pub fn open_synthetic_for_test( path: &Path, store_dir: StoreDir, tables: Vec<SyncedTable>, grace: Duration, transfer_limits: TransferLimits, device_id: String, clock: ClockRef, migrations: &[Migration], ) -> Result<Self, OpenError>

Source

pub fn open_synthetic_with_hlc_for_test( path: &Path, store_dir: StoreDir, tables: Vec<SyncedTable>, grace: Duration, transfer_limits: TransferLimits, hlc: Arc<Hlc>, migrations: &[Migration], ) -> Result<Self, OpenError>

Trait Implementations§

Source§

impl Clone for Database

Source§

fn clone(&self) -> Database

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,