pub struct AsyncViiperClient { /* private fields */ }Expand description
VIIPER management API client (asynchronous).
Implementations§
Source§impl AsyncViiperClient
impl AsyncViiperClient
Sourcepub fn new(addr: SocketAddr) -> Self
pub fn new(addr: SocketAddr) -> Self
Create a new async VIIPER client connecting to the specified address.
Sourcepub fn new_with_password(addr: SocketAddr, password: String) -> Self
pub fn new_with_password(addr: SocketAddr, password: String) -> Self
Create a new async VIIPER client with password authentication. Empty password string explicitly means no authentication.
Sourcepub async fn ping(&self) -> Result<PingResponse, ViiperError>
pub async fn ping(&self) -> Result<PingResponse, ViiperError>
Ping: ping -> PingResponse
Sourcepub async fn bus_list(&self) -> Result<BusListResponse, ViiperError>
pub async fn bus_list(&self) -> Result<BusListResponse, ViiperError>
BusList: bus/list -> BusListResponse
Sourcepub async fn bus_create(
&self,
uint32: Option<u32>,
) -> Result<BusCreateResponse, ViiperError>
pub async fn bus_create( &self, uint32: Option<u32>, ) -> Result<BusCreateResponse, ViiperError>
BusCreate: bus/create -> BusCreateResponse
Sourcepub async fn bus_remove(
&self,
uint32: Option<u32>,
) -> Result<BusRemoveResponse, ViiperError>
pub async fn bus_remove( &self, uint32: Option<u32>, ) -> Result<BusRemoveResponse, ViiperError>
BusRemove: bus/remove -> BusRemoveResponse
Sourcepub async fn bus_devices_list(
&self,
id: u32,
) -> Result<DevicesListResponse, ViiperError>
pub async fn bus_devices_list( &self, id: u32, ) -> Result<DevicesListResponse, ViiperError>
BusDevicesList: bus/{id}/list -> DevicesListResponse
Sourcepub async fn bus_device_add(
&self,
id: u32,
device_create_request: &DeviceCreateRequest,
) -> Result<Device, ViiperError>
pub async fn bus_device_add( &self, id: u32, device_create_request: &DeviceCreateRequest, ) -> Result<Device, ViiperError>
BusDeviceAdd: bus/{id}/add -> Device
Sourcepub async fn bus_device_remove(
&self,
id: u32,
string: Option<&str>,
) -> Result<DeviceRemoveResponse, ViiperError>
pub async fn bus_device_remove( &self, id: u32, string: Option<&str>, ) -> Result<DeviceRemoveResponse, ViiperError>
BusDeviceRemove: bus/{id}/remove -> DeviceRemoveResponse
Sourcepub async fn connect_device(
&self,
bus_id: u32,
dev_id: &str,
) -> Result<AsyncDeviceStream, ViiperError>
pub async fn connect_device( &self, bus_id: u32, dev_id: &str, ) -> Result<AsyncDeviceStream, ViiperError>
Connect to a device stream for sending input and receiving output.
Auto Trait Implementations§
impl Freeze for AsyncViiperClient
impl RefUnwindSafe for AsyncViiperClient
impl Send for AsyncViiperClient
impl Sync for AsyncViiperClient
impl Unpin for AsyncViiperClient
impl UnsafeUnpin for AsyncViiperClient
impl UnwindSafe for AsyncViiperClient
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