Struct magic_wormhole::transfer::ReceiveRequest
source · pub struct ReceiveRequest {
pub filename: PathBuf,
pub filesize: u64,
/* private fields */
}
Expand description
Fields§
§filename: PathBuf
Security warning: this is untrusted and unverified input
filesize: u64
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 !RefUnwindSafe for ReceiveRequest
impl Send for ReceiveRequest
impl Sync for ReceiveRequest
impl Unpin 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