Struct stdweb::web::Storage
[−]
[src]
pub struct Storage(_);
The Storage
interface of the Web Storage API provides access to
the session storage or local storage for a particular domain.
Methods
impl Storage
[src]
fn len(&self) -> usize
Gets the number of data items stored in the Storage
object.
fn get(&self, key: &str) -> Option<String>
Returns a value corresponding to the key.
fn insert(&self, key: &str, value: &str)
Inserts a key-value pair into the storage.
fn remove(&self, key: &str)
Removes a key from the storage.
fn clear(&self)
When invoked, will empty all keys out of the storage.
fn key(&self, nth: usize) -> Option<String>
Return the name of the nth key in the storage.
fn contains_key(&self, key: &str) -> bool
Returns true if the storage contains a value for the specified key.
Trait Implementations
impl Debug for Storage
[src]
impl Clone for Storage
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl AsRef<Reference> for Storage
[src]
impl<T: TryInto<Reference>> TryFrom<T> for Storage where
T::Error: Into<Box<Error>>,
[src]
T::Error: Into<Box<Error>>,