Enum iota_stronghold::Location [−][src]
pub enum Location { Generic { vault_path: Vec<u8>, record_path: Vec<u8>, }, Counter { vault_path: Vec<u8>, counter: usize, }, }
A Location
type used to specify where in the Stronghold
a piece of data should be stored. A generic location
specifies a non-versioned location while a counter location specifies a versioned location. The Counter location can
be used to get the head of the version chain by passing in None
as the counter index. Otherwise, counter records
are referenced through their associated index. On Read, the None
location is the latest record in the version
chain while on Write, the None
location is the next record in the version chain.
Variants
Implementations
impl Location
[src]
pub fn vault_path(&self) -> &[u8]
[src]
Gets the vault_path from the Location.
pub fn generic<V: Into<Vec<u8>>, R: Into<Vec<u8>>>(
vault_path: V,
record_path: R
) -> Self
[src]
vault_path: V,
record_path: R
) -> Self
Creates a generic location from types that implement Into<Vec<u8>>
.
pub fn counter<V: Into<Vec<u8>>, C: Into<usize>>(
vault_path: V,
counter: C
) -> Self
[src]
vault_path: V,
counter: C
) -> Self
Creates a counter location from a type that implements Into<Vec<u8>>
and a counter type that implements
Into<usize>
pub fn increment_counter(self) -> Self
[src]
Helper method used to increment counter locations.
pub const fn const_generic(vault_path: Vec<u8>, record_path: Vec<u8>) -> Self
[src]
Used to generate a constant generic location.
pub const fn const_counter(vault_path: Vec<u8>, counter: usize) -> Self
[src]
used to generate a constant counter location.
Trait Implementations
impl AsRef<Location> for Location
[src]
impl Clone for Location
[src]
impl Debug for Location
[src]
impl<'de> Deserialize<'de> for Location
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Location
[src]
Auto Trait Implementations
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
Blanket Implementations
impl<T> ActorArgs for T where
T: 'static + Clone + Send + Sync,
[src]
T: 'static + Clone + Send + Sync,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Message for T where
T: 'static + Debug + Clone + Send,
[src]
T: 'static + Debug + Clone + Send,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,