pub struct Uploader<'a> { /* private fields */ }
Expand description
Upload handler.
Implementations§
Source§impl<'a> Uploader<'a>
impl<'a> Uploader<'a>
Sourcepub fn upload_file(&self, file: &'a str) -> UploadResult<'a, String>
pub fn upload_file(&self, file: &'a str) -> UploadResult<'a, String>
Uploads the given file to the server.
Sourcepub fn upload_url(&self, url: &'a str) -> UploadResult<'a, String>
pub fn upload_url(&self, url: &'a str) -> UploadResult<'a, String>
Uploads the given URL (stream) to the server.
Sourcepub fn upload_remote_url(&self, url: &'a str) -> UploadResult<'a, String>
pub fn upload_remote_url(&self, url: &'a str) -> UploadResult<'a, String>
Uploads the given remote URL (stream) to the server.
Sourcepub fn upload_stream<S: Read>(&self, stream: S) -> UploadResult<'a, String>
pub fn upload_stream<S: Read>(&self, stream: S) -> UploadResult<'a, String>
Uploads a stream to the server.
Sourcepub fn delete_file(&self, file: &'a str) -> UploadResult<'a, String>
pub fn delete_file(&self, file: &'a str) -> UploadResult<'a, String>
Wrapper: Delete the given file from the server.
Sourcepub fn retrieve_url(&self, endpoint: &str) -> Result<Url>
pub fn retrieve_url(&self, endpoint: &str) -> Result<Url>
Returns a valid request URL for an endpoint.
Sourcepub fn retrieve_version(&self) -> Result<String>
pub fn retrieve_version(&self) -> Result<String>
Returns the server version.
Sourcepub fn retrieve_list<Output: Write>(
&self,
output: &mut Output,
prettify: bool,
) -> Result<()>
pub fn retrieve_list<Output: Write>( &self, output: &mut Output, prettify: bool, ) -> Result<()>
Retrieves and prints the files on server.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Uploader<'a>
impl<'a> !RefUnwindSafe for Uploader<'a>
impl<'a> Send for Uploader<'a>
impl<'a> Sync for Uploader<'a>
impl<'a> Unpin for Uploader<'a>
impl<'a> !UnwindSafe for Uploader<'a>
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