StorageROClient

Struct StorageROClient 

Source
pub struct StorageROClient {
    pub soc: Socket,
    pub addr: String,
    pub is_ready: bool,
}

Fields§

§soc: Socket§addr: String§is_ready: bool

Implementations§

Source§

impl StorageROClient

Source

pub fn new(addr: &str) -> Self

Source

pub fn connect(&mut self) -> bool

Source

pub fn get_individual_from_db( &mut self, db_id: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>

Source

pub fn count(&mut self, _storage: StorageId) -> StorageResult<usize>

Trait Implementations§

Source§

impl Default for StorageROClient

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Storage for StorageROClient

Source§

fn get_individual( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>

Source§

fn get_value( &mut self, _storage: StorageId, _key: &str, ) -> StorageResult<String>

Source§

fn get_raw_value( &mut self, _storage: StorageId, _key: &str, ) -> StorageResult<Vec<u8>>

Source§

fn put_value( &mut self, _storage: StorageId, _key: &str, _val: &str, ) -> StorageResult<()>

Source§

fn put_raw_value( &mut self, _storage: StorageId, _key: &str, _val: Vec<u8>, ) -> StorageResult<()>

Source§

fn remove_value(&mut self, _storage: StorageId, _key: &str) -> StorageResult<()>

Source§

fn count(&mut self, _storage: StorageId) -> StorageResult<usize>

Source§

fn get_individual_from_db( &mut self, storage: StorageId, id: &str, iraw: &mut Individual, ) -> StorageResult<()>

👎Deprecated since 0.1.0: Use get_individual instead
Source§

fn get_v(&mut self, storage: StorageId, key: &str) -> Option<String>

👎Deprecated since 0.1.0: Use get_value instead
Source§

fn get_raw(&mut self, storage: StorageId, key: &str) -> Vec<u8>

👎Deprecated since 0.1.0: Use get_raw_value instead
Source§

fn put_kv(&mut self, storage: StorageId, key: &str, val: &str) -> bool

👎Deprecated since 0.1.0: Use put_value instead
Source§

fn put_kv_raw(&mut self, storage: StorageId, key: &str, val: Vec<u8>) -> bool

👎Deprecated since 0.1.0: Use put_raw_value instead
Source§

fn remove(&mut self, storage: StorageId, key: &str) -> bool

👎Deprecated since 0.1.0: Use remove_value instead

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.