pub struct FileSender { /* private fields */ }
Implementations§
Source§impl FileSender
impl FileSender
Sourcepub fn new<T: AsRef<Path>>(target_path: T) -> Self
pub fn new<T: AsRef<Path>>(target_path: T) -> Self
Builds a new FileSender with the full path to the target file.
If the file does not exist, it will be created.
Sourcepub fn overwrite(self, overwrite: bool) -> Self
pub fn overwrite(self, overwrite: bool) -> Self
This will overwrite the contents of the target file.
Sourcepub async fn send_bytes(self, bytes: &[u8]) -> Result<()>
pub async fn send_bytes(self, bytes: &[u8]) -> Result<()>
Writes the bytes to the target file.
Sourcepub async fn send_string<T: AsRef<str>>(self, string: T) -> Result<()>
pub async fn send_string<T: AsRef<str>>(self, string: T) -> Result<()>
Writes the string to the target file.
Auto Trait Implementations§
impl Freeze for FileSender
impl RefUnwindSafe for FileSender
impl Send for FileSender
impl Sync for FileSender
impl Unpin for FileSender
impl UnwindSafe for FileSender
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