Struct rustypaste_cli::upload::Uploader
source · [−]pub struct Uploader<'a> { /* private fields */ }Expand description
Upload handler.
Implementations
sourceimpl<'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 retrieve_version(&self) -> Result<String>
pub fn retrieve_version(&self) -> Result<String>
Returns the server version.
Trait Implementations
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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