pub trait StorageMethods<D: DomTypes> {
// Required methods
fn Length(&self) -> u32;
fn Key(&self, index: u32) -> Option<DOMString>;
fn GetItem(&self, name: DOMString) -> Option<DOMString>;
fn SetItem(&self, name: DOMString, value: DOMString) -> Result<(), Error>;
fn RemoveItem(&self, name: DOMString);
fn Clear(&self);
fn SupportedPropertyNames(&self) -> Vec<DOMString>;
fn NamedGetter(&self, name: DOMString) -> Option<DOMString>;
fn NamedSetter(
&self,
name: DOMString,
value: DOMString,
) -> Result<(), Error>;
fn NamedDeleter(&self, name: DOMString);
}