pub struct AimxClient { /* private fields */ }Expand description
AimX protocol client
Implementations§
Source§impl AimxClient
impl AimxClient
Sourcepub async fn connect(socket_path: impl AsRef<Path>) -> ClientResult<Self>
pub async fn connect(socket_path: impl AsRef<Path>) -> ClientResult<Self>
Connect to an AimDB instance
Sourcepub fn server_info(&self) -> &WelcomeMessage
pub fn server_info(&self) -> &WelcomeMessage
Get server information
Sourcepub async fn list_records(&mut self) -> ClientResult<Vec<RecordMetadata>>
pub async fn list_records(&mut self) -> ClientResult<Vec<RecordMetadata>>
List all registered records
Sourcepub async fn get_record(&mut self, name: &str) -> ClientResult<Value>
pub async fn get_record(&mut self, name: &str) -> ClientResult<Value>
Get current value of a record
Sourcepub async fn set_record(
&mut self,
name: &str,
value: Value,
) -> ClientResult<Value>
pub async fn set_record( &mut self, name: &str, value: Value, ) -> ClientResult<Value>
Set value of a writable record
Sourcepub async fn subscribe(
&mut self,
name: &str,
queue_size: usize,
) -> ClientResult<String>
pub async fn subscribe( &mut self, name: &str, queue_size: usize, ) -> ClientResult<String>
Subscribe to record updates
Sourcepub async fn unsubscribe(&mut self, subscription_id: &str) -> ClientResult<()>
pub async fn unsubscribe(&mut self, subscription_id: &str) -> ClientResult<()>
Unsubscribe from record updates
Sourcepub async fn receive_event(&mut self) -> ClientResult<Event>
pub async fn receive_event(&mut self) -> ClientResult<Event>
Receive next event from subscription
Auto Trait Implementations§
impl Freeze for AimxClient
impl RefUnwindSafe for AimxClient
impl Send for AimxClient
impl Sync for AimxClient
impl Unpin for AimxClient
impl UnwindSafe for AimxClient
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