pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub async fn new() -> Result<Self, Qusb2snesError>
pub async fn new() -> Result<Self, Qusb2snesError>
§Errors
Will return Err if the underlying websockets::WebSocket returns an Err.
Sourcepub async fn device_list(&mut self) -> Result<Vec<String>, Qusb2snesError>
pub async fn device_list(&mut self) -> Result<Vec<String>, Qusb2snesError>
§Errors
This method can fail if the underlying websockets::WebSocket has an error,
or if there is an issue deserializing the list of devices.
Sourcepub async fn attach(&mut self, device: &str) -> Result<(), Qusb2snesError>
pub async fn attach(&mut self, device: &str) -> Result<(), Qusb2snesError>
§Errors
This method can fail if the device name to attach to is not serializable as a JSON string.
Sourcepub async fn info(&mut self) -> Result<Vec<String>, Qusb2snesError>
pub async fn info(&mut self) -> Result<Vec<String>, Qusb2snesError>
§Errors
This method can fail if there is an issue sending the message to the associated
websockets::WebSocket, or if there is an issue deserializing the response
from the websocket.
Sourcepub async fn get_address(
&mut self,
offset: usize,
length: usize,
) -> Result<Vec<u8>, Qusb2snesError>
pub async fn get_address( &mut self, offset: usize, length: usize, ) -> Result<Vec<u8>, Qusb2snesError>
§Errors
This method can fail if there is an issue sending the message to the associated
websockets::WebSocket, or if there is an issue deserializing the response
from the websocket.
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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