[][src]Struct webchain_rs::storage::addressbook::AddressbookStorage

pub struct AddressbookStorage { /* fields omitted */ }

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]

impl Clone for 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

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> Erased for T