[−][src]Struct exonum_merkledb::OwnedReadonlyFork
Version of ReadonlyFork
with a static lifetime. Can be produced from an Rc<Fork>
using
the AsReadonly
trait.
Beware that producing an instance increases the reference counter of the underlying fork.
If you need to obtain Fork
from Rc<Fork>
via Rc::try_unwrap
, make sure that all
OwnedReadonlyFork
instances are dropped by this time.
Examples
let db = TemporaryDB::new(); let fork = Rc::new(db.fork()); fork.get_proof_list("list").extend(vec![1_u32, 2, 3]); let ro_fork: OwnedReadonlyFork = fork.as_readonly(); let list = ro_fork.get_proof_list::<_, u32>("list"); assert_eq!(list.len(), 3);
Trait Implementations
impl AsReadonly for OwnedReadonlyFork
[src]
impl Clone for OwnedReadonlyFork
[src]
fn clone(&self) -> OwnedReadonlyFork
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OwnedReadonlyFork
[src]
impl<'_> From<OwnedReadonlyFork> for GenericRawAccess<'_>
[src]
fn from(ro_fork: OwnedReadonlyFork) -> Self
[src]
impl RawAccess for OwnedReadonlyFork
[src]
Auto Trait Implementations
impl !RefUnwindSafe for OwnedReadonlyFork
impl !Send for OwnedReadonlyFork
impl !Sync for OwnedReadonlyFork
impl Unpin for OwnedReadonlyFork
impl !UnwindSafe for OwnedReadonlyFork
Blanket Implementations
impl<T> Access for T where
T: RawAccess,
[src]
T: RawAccess,
type Base = T
Raw access serving as the basis for created indexes.
fn get_index_metadata(
Self,
IndexAddress
) -> Result<Option<IndexMetadata<Vec<u8>>>, AccessError>
[src]
Self,
IndexAddress
) -> Result<Option<IndexMetadata<Vec<u8>>>, AccessError>
fn get_or_create_view(
Self,
IndexAddress,
IndexType
) -> Result<ViewWithMetadata<<T as Access>::Base>, AccessError>
[src]
Self,
IndexAddress,
IndexType
) -> Result<ViewWithMetadata<<T as Access>::Base>, AccessError>
fn group_keys<K>(Self, IndexAddress) -> GroupKeys<<T as Access>::Base, K> where
K: BinaryKey + ?Sized,
<T as Access>::Base: AsReadonly,
<<T as Access>::Base as AsReadonly>::Readonly == <T as Access>::Base,
[src]
K: BinaryKey + ?Sized,
<T as Access>::Base: AsReadonly,
<<T as Access>::Base as AsReadonly>::Readonly == <T as Access>::Base,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,