pub struct ReceiveRequest { /* private fields */ }Expand description
Implementations§
Source§impl ReceiveRequest
impl ReceiveRequest
Sourcepub async fn accept<F, G, W>(
self,
transit_handler: G,
progress_handler: F,
content_handler: &mut W,
cancel: impl Future<Output = ()>,
) -> Result<(), TransferError>
pub async fn accept<F, G, W>( self, transit_handler: G, progress_handler: F, content_handler: &mut W, cancel: impl Future<Output = ()>, ) -> Result<(), TransferError>
Accept the file offer
This will transfer the file and save it on disk.
Sourcepub async fn reject(self) -> Result<(), TransferError>
pub async fn reject(self) -> Result<(), TransferError>
Reject the file offer
This will send an error message to the other side so that it knows the transfer failed.
Auto Trait Implementations§
impl Freeze for ReceiveRequest
impl !RefUnwindSafe for ReceiveRequest
impl Send for ReceiveRequest
impl Sync for ReceiveRequest
impl Unpin for ReceiveRequest
impl UnsafeUnpin for ReceiveRequest
impl !UnwindSafe for ReceiveRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more