pub struct Stream<I, T> { /* private fields */ }Expand description
Stream.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<I, T> Freeze for Stream<I, T>
impl<I, T> !RefUnwindSafe for Stream<I, T>
impl<I, T> !Send for Stream<I, T>
impl<I, T> !Sync for Stream<I, T>
impl<I, T> Unpin for Stream<I, T>where
T: Unpin,
impl<I, T> UnsafeUnpin for Stream<I, T>
impl<I, T> !UnwindSafe for Stream<I, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<K, V> TryAsStorage<K> for V
impl<K, V> TryAsStorage<K> for V
Source§fn try_as_storage(
item: &(dyn Any + 'static),
) -> Result<<V as TryAsStorage<K>>::Target<'_>, Error>
fn try_as_storage( item: &(dyn Any + 'static), ) -> Result<<V as TryAsStorage<K>>::Target<'_>, Error>
Attempts to convert into a storage reference.
§Errors
The following errors might be returned:
Error::Downcast: Item cannot be downcast.
§Examples
use std::any::Any;
use zrx_storage::convert::TryAsStorage;
use zrx_storage::Storage;
// Create storage and initial state
let mut storage = Storage::default();
storage.insert("key", 42);
// Obtain type-erased reference
let item: &dyn Any = &storage;
// Obtain storage reference
let storage = <i32>::try_as_storage(item)?;Source§impl<K, V> TryAsStorageMut<K> for V
impl<K, V> TryAsStorageMut<K> for V
Source§fn try_as_storage_mut(
item: &mut (dyn Any + 'static),
) -> Result<<V as TryAsStorageMut<K>>::Target<'_>, Error>
fn try_as_storage_mut( item: &mut (dyn Any + 'static), ) -> Result<<V as TryAsStorageMut<K>>::Target<'_>, Error>
Attempts to convert into a mutable storage reference.
§Errors
The following errors might be returned:
Error::Downcast: Item cannot be downcast.
§Examples
use std::any::Any;
use zrx_storage::convert::TryAsStorageMut;
use zrx_storage::Storage;
// Create storage and initial state
let mut storage = Storage::default();
storage.insert("key", 42);
// Obtain mutable type-erased reference
let item: &mut dyn Any = &mut storage;
// Obtain mutable storage reference
let storage = <i32>::try_as_storage_mut(item)?;