Struct linera_storage::DbStorage

source ·
pub struct DbStorage<Store, Clock> { /* private fields */ }
Expand description

Main implementation of the Storage trait.

Implementations§

source§

impl<Store> DbStorage<Store, WallClock>
where Store: KeyValueStore + Clone + Send + Sync + 'static, Store::Error: Send + Sync,

source

pub async fn initialize( config: Store::Config, namespace: &str, root_key: &[u8], wasm_runtime: Option<WasmRuntime>, ) -> Result<Self, Store::Error>

source

pub async fn new( config: Store::Config, namespace: &str, root_key: &[u8], wasm_runtime: Option<WasmRuntime>, ) -> Result<Self, Store::Error>

source§

impl<Store> DbStorage<Store, TestClock>
where Store: TestKeyValueStore + Clone + Send + Sync + 'static, Store::Error: Send + Sync,

source

pub async fn make_test_storage(wasm_runtime: Option<WasmRuntime>) -> Self

source

pub async fn new_for_testing( config: Store::Config, namespace: &str, root_key: &[u8], wasm_runtime: Option<WasmRuntime>, clock: TestClock, ) -> Result<Self, Store::Error>

Trait Implementations§

source§

impl<Store: Clone, Clock: Clone> Clone for DbStorage<Store, Clock>

source§

fn clone(&self) -> DbStorage<Store, Clock>

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<Store, C> Storage for DbStorage<Store, C>
where Store: KeyValueStore + Clone + Send + Sync + 'static, C: Clock + Clone + Send + Sync + 'static, Store::Error: Send + Sync,

§

type Context = ViewContext<ChainRuntimeContext<DbStorage<Store, C>>, Store>

The low-level storage implementation in use.
§

type Clock = C

The clock type being used.
source§

fn clock(&self) -> &C

Returns the current wall clock time.
source§

fn load_chain<'life0, 'async_trait>( &'life0 self, chain_id: ChainId, ) -> Pin<Box<dyn Future<Output = Result<ChainStateView<Self::Context>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Loads the view of a chain state. Read more
source§

fn contains_blob<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, ) -> Pin<Box<dyn Future<Output = Result<bool, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tests the existence of a blob with the given blob ID.
source§

fn missing_blobs<'life0, 'life1, 'async_trait>( &'life0 self, blob_ids: &'life1 [BlobId], ) -> Pin<Box<dyn Future<Output = Result<Vec<BlobId>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns what blobs from the input are missing from storage.
source§

fn contains_blob_state<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, ) -> Pin<Box<dyn Future<Output = Result<bool, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tests existence of a blob state with the given blob ID.
source§

fn read_hashed_confirmed_block<'life0, 'async_trait>( &'life0 self, hash: CryptoHash, ) -> Pin<Box<dyn Future<Output = Result<Hashed<ConfirmedBlock>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the hashed certificate value with the given hash.
source§

fn read_blob<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, ) -> Pin<Box<dyn Future<Output = Result<Blob, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the blob with the given blob ID.
source§

fn read_blobs<'life0, 'life1, 'async_trait>( &'life0 self, blob_ids: &'life1 [BlobId], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Blob>>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads the blobs with the given blob IDs.
source§

fn read_blob_state<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, ) -> Pin<Box<dyn Future<Output = Result<BlobState, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the blob state with the given blob ID.
source§

fn read_blob_states<'life0, 'life1, 'async_trait>( &'life0 self, blob_ids: &'life1 [BlobId], ) -> Pin<Box<dyn Future<Output = Result<Vec<BlobState>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads the blob states with the given blob IDs.
source§

fn read_hashed_confirmed_blocks_downward<'life0, 'async_trait>( &'life0 self, from: CryptoHash, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Hashed<ConfirmedBlock>>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the hashed certificate values in descending order from the given hash.
source§

fn write_blob<'life0, 'life1, 'async_trait>( &'life0 self, blob: &'life1 Blob, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes the given blob.
source§

fn maybe_write_blob_state<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, blob_state: BlobState, ) -> Pin<Box<dyn Future<Output = Result<Epoch, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Attempts to write the given blob state. Returns the latest Epoch to have used this blob.
source§

fn maybe_write_blob_states<'life0, 'life1, 'async_trait>( &'life0 self, blob_ids: &'life1 [BlobId], blob_state: BlobState, overwrite: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Epoch>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to write the given blob state. Returns the latest Epoch to have used this blob.
source§

fn write_blob_state<'life0, 'life1, 'async_trait>( &'life0 self, blob_id: BlobId, blob_state: &'life1 BlobState, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes the given blob state.
source§

fn maybe_write_blobs<'life0, 'life1, 'async_trait>( &'life0 self, blobs: &'life1 [Blob], ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes the given blobs, but only if they already have a blob state. Returns true for the blobs that were written.
source§

fn write_blobs<'life0, 'life1, 'async_trait>( &'life0 self, blobs: &'life1 [Blob], ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes several blobs.
source§

fn write_blobs_and_certificate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, blobs: &'life1 [Blob], certificate: &'life2 ConfirmedBlockCertificate, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Writes blobs and certificate
source§

fn contains_certificate<'life0, 'async_trait>( &'life0 self, hash: CryptoHash, ) -> Pin<Box<dyn Future<Output = Result<bool, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tests existence of the certificate with the given hash.
source§

fn read_certificate<'life0, 'async_trait>( &'life0 self, hash: CryptoHash, ) -> Pin<Box<dyn Future<Output = Result<ConfirmedBlockCertificate, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the certificate with the given hash.
source§

fn read_certificates<'life0, 'async_trait, I>( &'life0 self, hashes: I, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConfirmedBlockCertificate>, ViewError>> + Send + 'async_trait>>
where I: 'async_trait + IntoIterator<Item = CryptoHash> + Send, Self: 'async_trait, 'life0: 'async_trait,

Reads a number of certificates
source§

fn read_event<'life0, 'async_trait>( &'life0 self, event_id: EventId, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the event with the given ID.
source§

fn write_events<'life0, 'async_trait>( &'life0 self, events: impl 'async_trait + IntoIterator<Item = (EventId, Vec<u8>)> + Send, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Writes a vector of events.
source§

fn wasm_runtime(&self) -> Option<WasmRuntime>

Selects the WebAssembly runtime to use for applications (if any).
source§

fn load_active_chain<'life0, 'async_trait>( &'life0 self, id: ChainId, ) -> Pin<Box<dyn Future<Output = Result<ChainStateView<Self::Context>, ChainError>> + Send + 'async_trait>>
where ChainRuntimeContext<Self>: ExecutionRuntimeContext, Self: Sync + 'async_trait, 'life0: 'async_trait,

Loads the view of a chain state and checks that it is active. Read more
source§

fn create_chain<'life0, 'async_trait>( &'life0 self, committee: Committee, admin_id: ChainId, description: ChainDescription, owner: Owner, balance: Amount, timestamp: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), ChainError>> + Send + 'async_trait>>
where ChainRuntimeContext<Self>: ExecutionRuntimeContext, Self: Sync + 'async_trait, 'life0: 'async_trait,

Initializes a chain in a simple way (used for testing and to create a genesis state). Read more
source§

fn load_contract<'life0, 'life1, 'async_trait>( &'life0 self, application_description: &'life1 UserApplicationDescription, ) -> Pin<Box<dyn Future<Output = Result<UserContractCode, ExecutionError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a UserContractCode instance using the bytecode in storage referenced by the application_description.
source§

fn load_service<'life0, 'life1, 'async_trait>( &'life0 self, application_description: &'life1 UserApplicationDescription, ) -> Pin<Box<dyn Future<Output = Result<UserServiceCode, ExecutionError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a [linera-sdk::UserContract] instance using the bytecode in storage referenced by the application_description.

Auto Trait Implementations§

§

impl<Store, Clock> Freeze for DbStorage<Store, Clock>
where Clock: Freeze,

§

impl<Store, Clock> !RefUnwindSafe for DbStorage<Store, Clock>

§

impl<Store, Clock> Send for DbStorage<Store, Clock>
where Clock: Send, Store: Sync + Send,

§

impl<Store, Clock> Sync for DbStorage<Store, Clock>
where Clock: Sync, Store: Sync + Send,

§

impl<Store, Clock> Unpin for DbStorage<Store, Clock>
where Clock: Unpin,

§

impl<Store, Clock> !UnwindSafe for DbStorage<Store, Clock>

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

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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§

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<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

source§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

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

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<To, From> DynInto<To> for From
where From: Into<To>,

source§

fn into_box(self: Box<From>) -> To

Converts a boxed object into the target type.
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> 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> LayoutRaw for T

source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

source§

fn lift_into(self) -> U

Performs the indexed conversion.
source§

impl<T> MockResults for T

§

type Results = T

The mock native type of the results for the MockInstance.
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> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<M, I> RuntimeMemory<&mut I> for M
where M: RuntimeMemory<I>,

source§

fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>

Reads length bytes from memory from the provided location.

source§

fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>

Writes the bytes to memory at the provided location.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
source§

impl<AnyTail> Split<HNil> for AnyTail

§

type Remainder = AnyTail

The tail of remaining elements after splitting up the list.
source§

fn split(self) -> (HNil, <AnyTail as Split<HNil>>::Remainder)

Splits the current heterogeneous list in two.
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<T> Upcastable for T
where T: Any + Send + Sync + 'static,

source§

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

upcast ref
source§

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

upcast mut ref
source§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
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> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T

source§

impl<T> Post for T
where T: Send + Sync,