ViiperClient

Struct ViiperClient 

Source
pub struct ViiperClient { /* private fields */ }
Expand description

VIIPER management API client (synchronous).

Implementations§

Source§

impl ViiperClient

Source

pub fn new(host: impl Into<String>, port: u16) -> Self

Create a new VIIPER client connecting to the specified host and port.

Source

pub fn bus_list(&self) -> Result<BusListResponse, ViiperError>

BusList: bus/list -> BusListResponse

Source

pub fn bus_create( &self, uint32: Option<u32>, ) -> Result<BusCreateResponse, ViiperError>

BusCreate: bus/create -> BusCreateResponse

Source

pub fn bus_remove( &self, uint32: Option<u32>, ) -> Result<BusRemoveResponse, ViiperError>

BusRemove: bus/remove -> BusRemoveResponse

Source

pub fn bus_devices_list( &self, id: u32, ) -> Result<DevicesListResponse, ViiperError>

BusDevicesList: bus/{id}/list -> DevicesListResponse

Source

pub fn bus_device_add( &self, id: u32, device_create_request: &DeviceCreateRequest, ) -> Result<Device, ViiperError>

BusDeviceAdd: bus/{id}/add -> Device

Source

pub fn bus_device_remove( &self, id: u32, string: Option<&str>, ) -> Result<DeviceRemoveResponse, ViiperError>

BusDeviceRemove: bus/{id}/remove -> DeviceRemoveResponse

Source

pub fn connect_device( &self, bus_id: u32, dev_id: &str, ) -> Result<DeviceStream, ViiperError>

Connect to a device stream for sending input and receiving output.

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> 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, 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.