Trait ux::prelude::SocketExtManual[]

pub trait SocketExtManual {
    pub fn receive<B, C>(
        &self,
        buffer: B,
        cancellable: Option<&C>
    ) -> Result<usize, Error>
    where
        C: IsA<Cancellable>,
        B: AsMut<[u8]>
;
pub fn receive_from<B, C>(
        &self,
        buffer: B,
        cancellable: Option<&C>
    ) -> Result<(usize, SocketAddress), Error>
    where
        C: IsA<Cancellable>,
        B: AsMut<[u8]>
;
pub fn receive_with_blocking<B, C>(
        &self,
        buffer: B,
        blocking: bool,
        cancellable: Option<&C>
    ) -> Result<usize, Error>
    where
        C: IsA<Cancellable>,
        B: AsMut<[u8]>
;
pub fn send<B, C>(
        &self,
        buffer: B,
        cancellable: Option<&C>
    ) -> Result<usize, Error>
    where
        C: IsA<Cancellable>,
        B: AsRef<[u8]>
;
pub fn send_to<B, P, C>(
        &self,
        address: Option<&P>,
        buffer: B,
        cancellable: Option<&C>
    ) -> Result<usize, Error>
    where
        C: IsA<Cancellable>,
        P: IsA<SocketAddress>,
        B: AsRef<[u8]>
;
pub fn send_with_blocking<B, C>(
        &self,
        buffer: B,
        blocking: bool,
        cancellable: Option<&C>
    ) -> Result<usize, Error>
    where
        C: IsA<Cancellable>,
        B: AsRef<[u8]>
;
pub fn get_fd<T>(&self) -> T
    where
        T: FromRawFd
;
pub fn create_source<F, C>(
        &self,
        condition: IOCondition,
        cancellable: Option<&C>,
        name: Option<&str>,
        priority: Priority,
        func: F
    ) -> Source
    where
        C: IsA<Cancellable>,
        F: FnMut(&Self, IOCondition) -> Continue + 'static
;
pub fn create_source_future<C>(
        &self,
        condition: IOCondition,
        cancellable: Option<&C>,
        priority: Priority
    ) -> Pin<Box<dyn Future<Output = IOCondition> + 'static, Global>>
    where
        C: IsA<Cancellable>
;
pub fn create_source_stream<C>(
        &self,
        condition: IOCondition,
        cancellable: Option<&C>,
        priority: Priority
    ) -> Pin<Box<dyn Stream<Item = IOCondition> + 'static, Global>>
    where
        C: IsA<Cancellable>
; }

Required methods

pub fn receive<B, C>(
    &self,
    buffer: B,
    cancellable: Option<&C>
) -> Result<usize, Error> where
    C: IsA<Cancellable>,
    B: AsMut<[u8]>, 

pub fn receive_from<B, C>(
    &self,
    buffer: B,
    cancellable: Option<&C>
) -> Result<(usize, SocketAddress), Error> where
    C: IsA<Cancellable>,
    B: AsMut<[u8]>, 

pub fn receive_with_blocking<B, C>(
    &self,
    buffer: B,
    blocking: bool,
    cancellable: Option<&C>
) -> Result<usize, Error> where
    C: IsA<Cancellable>,
    B: AsMut<[u8]>, 

pub fn send<B, C>(
    &self,
    buffer: B,
    cancellable: Option<&C>
) -> Result<usize, Error> where
    C: IsA<Cancellable>,
    B: AsRef<[u8]>, 

pub fn send_to<B, P, C>(
    &self,
    address: Option<&P>,
    buffer: B,
    cancellable: Option<&C>
) -> Result<usize, Error> where
    C: IsA<Cancellable>,
    P: IsA<SocketAddress>,
    B: AsRef<[u8]>, 

pub fn send_with_blocking<B, C>(
    &self,
    buffer: B,
    blocking: bool,
    cancellable: Option<&C>
) -> Result<usize, Error> where
    C: IsA<Cancellable>,
    B: AsRef<[u8]>, 

pub fn get_fd<T>(&self) -> T where
    T: FromRawFd

pub fn create_source<F, C>(
    &self,
    condition: IOCondition,
    cancellable: Option<&C>,
    name: Option<&str>,
    priority: Priority,
    func: F
) -> Source where
    C: IsA<Cancellable>,
    F: FnMut(&Self, IOCondition) -> Continue + 'static, 

pub fn create_source_future<C>(
    &self,
    condition: IOCondition,
    cancellable: Option<&C>,
    priority: Priority
) -> Pin<Box<dyn Future<Output = IOCondition> + 'static, Global>> where
    C: IsA<Cancellable>, 

pub fn create_source_stream<C>(
    &self,
    condition: IOCondition,
    cancellable: Option<&C>,
    priority: Priority
) -> Pin<Box<dyn Stream<Item = IOCondition> + 'static, Global>> where
    C: IsA<Cancellable>, 

Loading content...

Implementors

impl<O> SocketExtManual for O where
    O: IsA<Socket>, 

Loading content...