Skip to main content

AsymmetricLink

Struct AsymmetricLink 

Source
pub struct AsymmetricLink<S, R> { /* private fields */ }
Expand description

A data link composed of separate sender and receiver halves.

Implementations§

Source§

impl<S, R> AsymmetricLink<S, R>

Source

pub fn new(sender: S, receiver: R) -> Self

Creates a new asymmetric link from separate sender and receiver.

Trait Implementations§

Source§

impl<S, R> DatalinkRead for AsymmetricLink<S, R>

Source§

type Error = AsymmetricLinkError<<S as DatalinkWrite>::Error, <R as DatalinkRead>::Error>

Error type for read operations.
Source§

async fn read(&mut self, buffer: &mut [u8]) -> Result<usize, Self::Error>

Read data from the link into buffer.
Source§

impl<S, R> DatalinkWrite for AsymmetricLink<S, R>

Source§

type Error = AsymmetricLinkError<<S as DatalinkWrite>::Error, <R as DatalinkRead>::Error>

Error type for write operations.
Source§

async fn write(&mut self, data: &[u8]) -> Result<(), Self::Error>

Write data over the link.

Auto Trait Implementations§

§

impl<S, R> Freeze for AsymmetricLink<S, R>
where S: Freeze, R: Freeze,

§

impl<S, R> RefUnwindSafe for AsymmetricLink<S, R>

§

impl<S, R> Send for AsymmetricLink<S, R>
where S: Send, R: Send,

§

impl<S, R> Sync for AsymmetricLink<S, R>
where S: Sync, R: Sync,

§

impl<S, R> Unpin for AsymmetricLink<S, R>
where S: Unpin, R: Unpin,

§

impl<S, R> UnsafeUnpin for AsymmetricLink<S, R>
where S: UnsafeUnpin, R: UnsafeUnpin,

§

impl<S, R> UnwindSafe for AsymmetricLink<S, R>
where S: UnwindSafe, R: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
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.