Trait Uring

Source
pub trait Uring: Sealed {
    type A;
    type B;
    type Ext;

    // Required methods
    fn header(&self) -> &Header<Self::Ext>;
    fn sender(&self) -> Queue<'_, Self::A>;
    fn receiver(&self) -> Queue<'_, Self::B>;

    // Provided methods
    fn ext(&self) -> &Self::Ext
       where Self::Ext: Sync { ... }
    fn is_connected(&self) -> bool { ... }
    fn send(&mut self, val: Self::A) -> Result<(), Self::A> { ... }
    fn send_bulk<I>(&mut self, vals: I) -> usize
       where I: Iterator<Item = Self::A> { ... }
    fn recv(&mut self) -> Option<Self::B> { ... }
    fn recv_bulk(&mut self) -> Drain<'_, Self::B>  { ... }
}

Required Associated Types§

Required Methods§

Source

fn header(&self) -> &Header<Self::Ext>

Source

fn sender(&self) -> Queue<'_, Self::A>

Source

fn receiver(&self) -> Queue<'_, Self::B>

Provided Methods§

Source

fn ext(&self) -> &Self::Ext
where Self::Ext: Sync,

Source

fn is_connected(&self) -> bool

Returns true if the remote Uring is not dropped.

Source

fn send(&mut self, val: Self::A) -> Result<(), Self::A>

Source

fn send_bulk<I>(&mut self, vals: I) -> usize
where I: Iterator<Item = Self::A>,

Source

fn recv(&mut self) -> Option<Self::B>

Source

fn recv_bulk(&mut self) -> Drain<'_, Self::B>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A, B, Ext> Uring for UringA<A, B, Ext>

Source§

type A = A

Source§

type B = B

Source§

type Ext = Ext

Source§

impl<A, B, Ext> Uring for UringB<A, B, Ext>

Source§

type A = B

Source§

type B = A

Source§

type Ext = Ext

Source§

impl<T, Ext> Uring for UringEither<T, Ext>

Source§

type A = T

Source§

type B = T

Source§

type Ext = Ext