Struct curl::multi::WaitFd

pub struct WaitFd { /* fields hidden */ }
Documentation

File descriptor to wait on for use with the wait method on a multi handle.

Implementations

impl WaitFd
pub fn new() -> WaitFd

Constructs an empty (invalid) WaitFd.

pub fn set_fd(&mut Self, fd: Socket)

Set the file descriptor to wait for.

pub fn poll_on_read(&mut Self, val: bool) -> &mut WaitFd

Indicate that the socket should poll on read events such as new data received.

Corresponds to CURL_WAIT_POLLIN.

pub fn poll_on_priority_read(&mut Self, val: bool) -> &mut WaitFd

Indicate that the socket should poll on high priority read events such as out of band data.

Corresponds to CURL_WAIT_POLLPRI.

pub fn poll_on_write(&mut Self, val: bool) -> &mut WaitFd

Indicate that the socket should poll on write events such as the socket being clear to write without blocking.

Corresponds to CURL_WAIT_POLLOUT.

pub fn received_read(&Self) -> bool

After a call to wait, returns true if poll_on_read was set and a read event occured.

pub fn received_priority_read(&Self) -> bool

After a call to wait, returns true if poll_on_priority_read was set and a priority read event occured.

pub fn received_write(&Self) -> bool

After a call to wait, returns true if poll_on_write was set and a write event occured.

Trait Implementations

impl Debug for WaitFd
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl From<pollfd> for WaitFd
fn from(pfd: pollfd) -> WaitFd

Auto Trait Implementations

impl RefUnwindSafe for WaitFd
impl Send for WaitFd
impl Sync for WaitFd
impl Unpin for WaitFd
impl UnwindSafe for WaitFd

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>