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
[src]
Gets the number of data items stored in the Storage
object.
fn get(&self, key: &str) -> Option<String>
[src]
Returns a value corresponding to the key.
fn insert(&self, key: &str, value: &str)
[src]
Inserts a key-value pair into the storage.
fn remove(&self, key: &str)
[src]
Removes a key from the storage.
fn clear(&self)
[src]
When invoked, will empty all keys out of the storage.
fn key(&self, nth: usize) -> Option<String>
[src]
Return the name of the nth key in the storage.
fn contains_key(&self, key: &str) -> bool
[src]
Returns true if the storage contains a value for the specified key.
Trait Implementations
impl Debug for Storage
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
Formats the value using the given formatter.
impl Clone for Storage
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl AsRef<Reference> for Storage
[src]
impl<R: TryInto<Reference>> TryFrom<R> for Storage where
<R as TryInto<Reference>>::Error: Into<Box<Error>>,
[src]
<R as TryInto<Reference>>::Error: Into<Box<Error>>,