pub struct SmithClient { /* private fields */ }Expand description
Smith service client with both TCP and Unix socket support
Implementations§
Source§impl SmithClient
impl SmithClient
Sourcepub async fn connect_tcp(address: &str) -> Result<Self>
pub async fn connect_tcp(address: &str) -> Result<Self>
Connect to Smith service via TCP
Sourcepub async fn connect_unix<P: AsRef<Path>>(socket_path: P) -> Result<Self>
pub async fn connect_unix<P: AsRef<Path>>(socket_path: P) -> Result<Self>
Connect to Smith service via Unix socket
Sourcepub async fn send_command(&self, command: Command) -> Result<()>
pub async fn send_command(&self, command: Command) -> Result<()>
Send command to Smith service
Sourcepub async fn receive_events(&self) -> Result<Vec<Event>>
pub async fn receive_events(&self) -> Result<Vec<Event>>
Receive events from Smith service
Sourcepub async fn receive_event(&self) -> Result<Event>
pub async fn receive_event(&self) -> Result<Event>
Get single event (blocking)
Auto Trait Implementations§
impl Freeze for SmithClient
impl !RefUnwindSafe for SmithClient
impl Send for SmithClient
impl Sync for SmithClient
impl Unpin for SmithClient
impl UnsafeUnpin for SmithClient
impl !UnwindSafe for SmithClient
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