pub struct Message<'multi> { /* private fields */ }
Expand description
Message from the messages
function of a multi handle.
Currently only indicates whether a transfer is done.
Implementations
sourceimpl<'multi> Message<'multi>
impl<'multi> Message<'multi>
sourcepub fn result(&self) -> Option<Result<(), Error>>
pub fn result(&self) -> Option<Result<(), Error>>
If this message indicates that a transfer has finished, returns the
result of the transfer in Some
.
If the message doesn’t indicate that a transfer has finished, then
None
is returned.
Note that the result*_for
methods below should be preferred as they
provide better error messages as the associated error data on the
handle can be associated with the error type.
sourcepub fn result_for(&self, handle: &EasyHandle) -> Option<Result<(), Error>>
pub fn result_for(&self, handle: &EasyHandle) -> Option<Result<(), Error>>
Same as result
, except only returns Some
for the specified handle.
Note that this function produces better error messages than result
as
it uses take_error_buf
to associate error information with the
returned error.
sourcepub fn result_for2<H>(
&self,
handle: &Easy2Handle<H>
) -> Option<Result<(), Error>>
pub fn result_for2<H>(
&self,
handle: &Easy2Handle<H>
) -> Option<Result<(), Error>>
Same as result
, except only returns Some
for the specified handle.
Note that this function produces better error messages than result
as
it uses take_error_buf
to associate error information with the
returned error.
sourcepub fn is_for(&self, handle: &EasyHandle) -> bool
pub fn is_for(&self, handle: &EasyHandle) -> bool
Returns whether this easy message was for the specified easy handle or not.
sourcepub fn is_for2<H>(&self, handle: &Easy2Handle<H>) -> bool
pub fn is_for2<H>(&self, handle: &Easy2Handle<H>) -> bool
Same as is_for
, but for Easy2Handle
.
Trait Implementations
Auto Trait Implementations
impl<'multi> !RefUnwindSafe for Message<'multi>
impl<'multi> !Send for Message<'multi>
impl<'multi> !Sync for Message<'multi>
impl<'multi> Unpin for Message<'multi>
impl<'multi> !UnwindSafe for Message<'multi>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more