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: boolImplementations§
Source§impl IPCClient
impl IPCClient
pub fn default() -> Result<IPCClient>
pub fn connect(socket: &str) -> Result<IPCClient>
pub fn create_blob(&mut self, size: usize) -> Result<BlobWriter>
pub fn get_blob(&mut self, id: ObjectID) -> Result<Blob>
pub fn get<T: Object + Create>(&mut self, id: ObjectID) -> Result<Box<T>>
pub fn fetch_and_get<T: Object + Create>( &mut self, id: ObjectID, ) -> Result<Box<dyn Object>>
Trait Implementations§
Source§impl Client for IPCClient
impl Client for IPCClient
Source§fn disconnect(&mut self)
fn disconnect(&mut self)
Disconnect this client.
fn connected(&mut self) -> bool
fn ensure_connect(&mut self) -> Result<ReentrantMutexGuard<'_, ()>>
fn do_read(&mut self) -> Result<String>
fn do_write(&mut self, message_out: &str) -> Result<()>
fn instance_id(&self) -> InstanceID
fn create_metadata(&mut self, metadata: &ObjectMeta) -> Result<ObjectMeta>
fn get_metadata(&mut self, id: ObjectID) -> Result<ObjectMeta>
fn get_metadata_batch(&mut self, ids: &[ObjectID]) -> Result<Vec<ObjectMeta>>
fn fetch_and_get_metadata(&mut self, id: ObjectID) -> Result<ObjectMeta>
fn fetch_and_get_metadata_batch( &mut self, ids: &[ObjectID], ) -> Result<Vec<ObjectMeta>>
fn drop_buffer(&mut self, id: ObjectID) -> Result<()>
fn seal_buffer(&mut self, id: ObjectID) -> Result<()>
fn get_data( &mut self, id: ObjectID, sync_remote: bool, wait: bool, ) -> Result<JSON>
fn get_data_batch(&mut self, ids: &[ObjectID]) -> Result<Vec<JSON>>
fn create_data( &mut self, data: &JSON, ) -> Result<(ObjectID, Signature, InstanceID)>
fn sync_metadata(&mut self) -> Result<()>
fn delete(&mut self, id: ObjectID, force: bool, deep: bool) -> Result<()>
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>>
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>>
fn list_name( &mut self, pattern: &str, regex: bool, limit: usize, ) -> Result<HashMap<String, ObjectID>>
@param pattern: The pattern of object name.
fn persist(&mut self, id: ObjectID) -> Result<()>
fn if_persist(&mut self, id: ObjectID) -> Result<bool>
fn exists(&mut self, id: ObjectID) -> Result<bool>
fn put_name(&mut self, id: ObjectID, name: &str) -> Result<()>
fn get_name(&mut self, name: &str, wait: bool) -> Result<ObjectID>
fn drop_name(&mut self, name: &str) -> Result<()>
fn migrate(&mut self, id: ObjectID) -> Result<ObjectID>
fn clear(&mut self) -> Result<()>
fn label(&mut self, id: ObjectID, key: &str, value: &str) -> Result<()>
fn evict(&mut self, id: ObjectID) -> Result<()>
fn evict_batch(&mut self, ids: &[ObjectID]) -> Result<()>
fn load(&mut self, id: ObjectID, pin: bool) -> Result<()>
fn load_batch(&mut self, ids: &[ObjectID], pin: bool) -> Result<()>
fn unpin(&mut self, id: ObjectID) -> Result<()>
fn unpin_batch(&mut self, ids: &[ObjectID]) -> Result<()>
impl Send for IPCClient
impl Sync for IPCClient
Auto Trait Implementations§
impl !Freeze for IPCClient
impl !RefUnwindSafe for IPCClient
impl Unpin for IPCClient
impl UnwindSafe for IPCClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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