[−][src]Struct webchain_rs::storage::addressbook::AddressbookStorage
Addressbook Service
Methods
impl AddressbookStorage
[src]
pub fn new(dir: PathBuf) -> AddressbookStorage
[src]
Initialize new addressbook service for a dir
pub fn read_json(path: &Path) -> Result<Value, AddressbookError>
[src]
Read addressbook files
pub fn list(&self) -> Vec<Value>
[src]
List all entries in the addressbook
pub fn validate(&self, entry: &Value) -> Result<(), AddressbookError>
[src]
Validate addressbook entry structure
pub fn add(&self, entry: &Value) -> Result<(), AddressbookError>
[src]
Add new address entry to addressbook storage
pub fn edit(&self, entry: &Value) -> Result<(), AddressbookError>
[src]
Edit address entry in addressbook storage (address cannot change)
pub fn delete(&self, entry: &Value) -> Result<(), AddressbookError>
[src]
Delete address entry in addressbook storage (address cannot change)
Trait Implementations
impl PartialEq<AddressbookStorage> for AddressbookStorage
[src]
fn eq(&self, other: &AddressbookStorage) -> bool
[src]
fn ne(&self, other: &AddressbookStorage) -> bool
[src]
impl Clone for AddressbookStorage
[src]
fn clone(&self) -> AddressbookStorage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for AddressbookStorage
[src]
impl Debug for AddressbookStorage
[src]
Auto Trait Implementations
impl Send for AddressbookStorage
impl Sync for AddressbookStorage
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
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]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,