[−][src]Struct stdweb::web::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]
impl Storagepub fn len(&self) -> u32 | [src] |
Gets the number of data items stored in the Storage object.
pub fn get(&self, key: &str) -> Option<String> | [src] |
Returns a value corresponding to the key.
pub fn insert(&self, key: &str, value: &str) -> Result<(), TODO> | [src] |
Inserts a key-value pair into the storage.
pub fn remove(&self, key: &str) | [src] |
Removes a key from the storage.
pub fn clear(&self) | [src] |
When invoked, will empty all keys out of the storage.
pub fn key(&self, nth: u32) -> Option<String> | [src] |
Return the name of the nth key in the storage.
pub fn contains_key(&self, key: &str) -> bool | [src] |
Returns true if the storage contains a value for the specified key.
Trait Implementations
impl JsSerialize for Storage[src]
impl JsSerialize for Storageimpl TryFrom<Storage> for Reference[src]
impl TryFrom<Storage> for Referencetype Error = Void
The type returned in the event of a conversion error.
fn try_from(value: Storage) -> Result<Self, Self::Error> | [src] |
impl TryFrom<Reference> for Storage[src]
impl TryFrom<Reference> for Storagetype Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error> | [src] |
impl<'_r> TryFrom<&'_r Reference> for Storage[src]
impl<'_r> TryFrom<&'_r Reference> for Storagetype Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error> | [src] |
impl TryFrom<Value> for Storage[src]
impl TryFrom<Value> for Storagetype Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error> | [src] |
impl<'_r> TryFrom<&'_r Value> for Storage[src]
impl<'_r> TryFrom<&'_r Value> for Storagetype Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error> | [src] |
impl InstanceOf for Storage[src]
impl InstanceOf for Storagefn instance_of(reference: &Reference) -> bool | [src] |
impl ReferenceType for Storage[src]
impl ReferenceType for Storageunsafe fn from_reference_unchecked(reference: Reference) -> Self | [src] |
impl From<Storage> for Reference[src]
impl From<Storage> for Referenceimpl Eq for Storage[src]
impl Eq for Storageimpl PartialEq<Storage> for Storage[src]
impl PartialEq<Storage> for Storageimpl AsRef<Reference> for Storage[src]
impl AsRef<Reference> for Storageimpl Clone for Storage[src]
impl Clone for Storagefn clone(&self) -> Storage | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source. Read more
impl Debug for Storage[src]
impl Debug for StorageAuto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId | [src] |