pub struct StorageTransaction<Storage: ?Sized> { /* private fields */ }
Expand description
The storage transaction for the Storage
type.
Implementations§
source§impl<Storage> StorageTransaction<Storage>
impl<Storage> StorageTransaction<Storage>
sourcepub fn new<T: Transaction<Storage> + 'static>(t: T) -> Self
pub fn new<T: Transaction<Storage> + 'static>(t: T) -> Self
Create a new storage transaction.
source§impl<Storage: ?Sized> StorageTransaction<Storage>
impl<Storage: ?Sized> StorageTransaction<Storage>
sourcepub fn commit(self) -> StorageResult<()>
pub fn commit(self) -> StorageResult<()>
Committing of the state consumes Self
.
Trait Implementations§
source§impl<Storage: ?Sized> AsMut<Storage> for StorageTransaction<Storage>
impl<Storage: ?Sized> AsMut<Storage> for StorageTransaction<Storage>
source§fn as_mut(&mut self) -> &mut Storage
fn as_mut(&mut self) -> &mut Storage
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<Storage: ?Sized> AsRef<Storage> for StorageTransaction<Storage>
impl<Storage: ?Sized> AsRef<Storage> for StorageTransaction<Storage>
source§impl<Storage: ?Sized> Transaction<Storage> for StorageTransaction<Storage>
impl<Storage: ?Sized> Transaction<Storage> for StorageTransaction<Storage>
source§fn commit(&mut self) -> StorageResult<()>
fn commit(&mut self) -> StorageResult<()>
Commits the pending state changes into the storage.
Auto Trait Implementations§
impl<Storage> !RefUnwindSafe for StorageTransaction<Storage>
impl<Storage: ?Sized> Send for StorageTransaction<Storage>
impl<Storage: ?Sized> Sync for StorageTransaction<Storage>
impl<Storage: ?Sized> Unpin for StorageTransaction<Storage>
impl<Storage> !UnwindSafe for StorageTransaction<Storage>
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
§impl<T> StorageAsMut for T
impl<T> StorageAsMut for T
fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,
fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,
§impl<T> StorageAsRef for T
impl<T> StorageAsRef for T
fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,
fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)