pub struct LocoClient<T> { /* private fields */ }

Implementations§

source§

impl<T> LocoClient<T>

source

pub const MAX_READ_SIZE: u64 = 16_777_216u64

source

pub const fn new(inner: T) -> Self

source

pub const fn inner(&self) -> &T

source

pub fn inner_mut(&mut self) -> &mut T

source

pub fn inner_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>

source

pub fn into_inner(self) -> T

source§

impl<T: AsyncRead> LocoClient<T>

source

pub async fn read(&mut self) -> Result<BoxedCommand>where T: Unpin,

source

pub fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<BoxedCommand>>

source§

impl<T: AsyncWrite> LocoClient<T>

source

pub async fn send(&mut self, method: Method, data: &[u8]) -> Result<u32>where T: Unpin,

source

pub fn write(self: Pin<&mut Self>, method: Method, data: &[u8]) -> u32

source

pub fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<()>>

source§

impl<T: AsyncRead + AsyncWrite + Unpin> LocoClient<T>

source

pub async fn request( &mut self, method: Method, data: &[u8] ) -> Result<impl Future<Output = Result<BoxedCommand>> + '_>

Trait Implementations§

source§

impl<T: Debug> Debug for LocoClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'__pin, T> Unpin for LocoClient<T>where __Origin<'__pin, T>: Unpin,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LocoClient<T>where T: RefUnwindSafe,

§

impl<T> Send for LocoClient<T>where T: Send,

§

impl<T> Sync for LocoClient<T>where T: Sync,

§

impl<T> UnwindSafe for LocoClient<T>where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V