Struct aptos_secure_storage::InMemoryStorage
source · [−]pub struct InMemoryStorage { /* private fields */ }Expand description
InMemoryStorage represents a key value store that is purely in memory and intended for single threads (or must be wrapped by a Arc<RwLock<>>). This provides no permission checks and simply is a proof of concept to unblock building of applications without more complex data stores. Internally, it retains all data, which means that it must make copies of all key material which violates the code base. It violates it because the anticipation is that data stores would securely handle key material. This should not be used in production.
Implementations
sourceimpl InMemoryStorage
impl InMemoryStorage
pub fn new_with_time_service(time_service: TimeService) -> Self
Trait Implementations
sourceimpl Default for InMemoryStorage
impl Default for InMemoryStorage
sourcefn default() -> InMemoryStorage
fn default() -> InMemoryStorage
Returns the “default value” for a type. Read more
sourceimpl From<InMemoryStorage> for Storage
impl From<InMemoryStorage> for Storage
sourcefn from(v: InMemoryStorage) -> Storage
fn from(v: InMemoryStorage) -> Storage
Converts to this type from the input type.
sourceimpl KVStorage for InMemoryStorage
impl KVStorage for InMemoryStorage
sourcefn available(&self) -> Result<(), Error>
fn available(&self) -> Result<(), Error>
Returns an error if the backend service is not online and available.
sourcefn get<V: DeserializeOwned>(&self, key: &str) -> Result<GetResponse<V>, Error>
fn get<V: DeserializeOwned>(&self, key: &str) -> Result<GetResponse<V>, Error>
Retrieves a value from storage and fails if the backend is unavailable or the process has invalid permissions. Read more
sourceimpl TryInto<InMemoryStorage> for Storage
impl TryInto<InMemoryStorage> for Storage
sourcefn try_into(
self
) -> Result<InMemoryStorage, <Self as TryInto<InMemoryStorage>>::Error>
fn try_into(
self
) -> Result<InMemoryStorage, <Self as TryInto<InMemoryStorage>>::Error>
Performs the conversion.
impl CryptoKVStorage for InMemoryStorage
Auto Trait Implementations
impl RefUnwindSafe for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnwindSafe for InMemoryStorage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more