IPCClient

Struct IPCClient 

Source
pub struct IPCClient {
    pub ipc_socket: String,
    pub rpc_endpoint: String,
    pub instance_id: InstanceID,
    pub server_version: String,
    pub support_rpc_compression: bool,
    /* private fields */
}

Fields§

§ipc_socket: String§rpc_endpoint: String§instance_id: InstanceID§server_version: String§support_rpc_compression: bool

Implementations§

Source§

impl IPCClient

Source

pub fn default() -> Result<IPCClient>

Source

pub fn connect(socket: &str) -> Result<IPCClient>

Source

pub fn create_blob(&mut self, size: usize) -> Result<BlobWriter>

Source

pub fn get_blob(&mut self, id: ObjectID) -> Result<Blob>

Source

pub fn get<T: Object + Create>(&mut self, id: ObjectID) -> Result<Box<T>>

Source

pub fn fetch_and_get<T: Object + Create>( &mut self, id: ObjectID, ) -> Result<Box<dyn Object>>

Trait Implementations§

Source§

impl Client for IPCClient

Source§

fn disconnect(&mut self)

Disconnect this client.
Source§

fn connected(&mut self) -> bool

Source§

fn ensure_connect(&mut self) -> Result<ReentrantMutexGuard<'_, ()>>

Source§

fn do_read(&mut self) -> Result<String>

Source§

fn do_write(&mut self, message_out: &str) -> Result<()>

Source§

fn instance_id(&self) -> InstanceID

Source§

fn create_metadata(&mut self, metadata: &ObjectMeta) -> Result<ObjectMeta>

Source§

fn get_metadata(&mut self, id: ObjectID) -> Result<ObjectMeta>

Source§

fn get_metadata_batch(&mut self, ids: &[ObjectID]) -> Result<Vec<ObjectMeta>>

Source§

fn fetch_and_get_metadata(&mut self, id: ObjectID) -> Result<ObjectMeta>

Source§

fn fetch_and_get_metadata_batch( &mut self, ids: &[ObjectID], ) -> Result<Vec<ObjectMeta>>

Source§

fn drop_buffer(&mut self, id: ObjectID) -> Result<()>

Source§

fn seal_buffer(&mut self, id: ObjectID) -> Result<()>

Source§

fn get_data( &mut self, id: ObjectID, sync_remote: bool, wait: bool, ) -> Result<JSON>

Source§

fn get_data_batch(&mut self, ids: &[ObjectID]) -> Result<Vec<JSON>>

Source§

fn create_data( &mut self, data: &JSON, ) -> Result<(ObjectID, Signature, InstanceID)>

Source§

fn sync_metadata(&mut self) -> Result<()>

Source§

fn delete(&mut self, id: ObjectID, force: bool, deep: bool) -> Result<()>

Source§

fn delete_batch( &mut self, ids: &[ObjectID], force: bool, deep: bool, ) -> Result<()>

Source§

fn list_data( &mut self, pattern: &str, regex: bool, limit: usize, ) -> Result<Vec<JSON>>

@param pattern: The pattern of typename.
Source§

fn list_name( &mut self, pattern: &str, regex: bool, limit: usize, ) -> Result<HashMap<String, ObjectID>>

@param pattern: The pattern of object name.
Source§

fn persist(&mut self, id: ObjectID) -> Result<()>

Source§

fn if_persist(&mut self, id: ObjectID) -> Result<bool>

Source§

fn exists(&mut self, id: ObjectID) -> Result<bool>

Source§

fn put_name(&mut self, id: ObjectID, name: &str) -> Result<()>

Source§

fn get_name(&mut self, name: &str, wait: bool) -> Result<ObjectID>

Source§

fn drop_name(&mut self, name: &str) -> Result<()>

Source§

fn migrate(&mut self, id: ObjectID) -> Result<ObjectID>

Source§

fn clear(&mut self) -> Result<()>

Source§

fn label(&mut self, id: ObjectID, key: &str, value: &str) -> Result<()>

Source§

fn evict(&mut self, id: ObjectID) -> Result<()>

Source§

fn evict_batch(&mut self, ids: &[ObjectID]) -> Result<()>

Source§

fn load(&mut self, id: ObjectID, pin: bool) -> Result<()>

Source§

fn load_batch(&mut self, ids: &[ObjectID], pin: bool) -> Result<()>

Source§

fn unpin(&mut self, id: ObjectID) -> Result<()>

Source§

fn unpin_batch(&mut self, ids: &[ObjectID]) -> Result<()>

Source§

impl Debug for IPCClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for IPCClient

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for IPCClient

Source§

impl Sync for IPCClient

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V