[][src]Struct tus::Client

pub struct Client { /* fields omitted */ }

A client for a TUS endpoint. This leaks a lot of the implementation details of reqwest.

Methods

impl Client[src]

pub fn new(url: Url, headers: HeaderMap) -> Client[src]

Creates a new Client.

Headers should be a HeaderMap preloaded with all necessary information to communicate with the endpoint, including eg authentication information.

pub fn upload<T>(self, reader: T) -> Result<usize, Error> where
    T: Read
[src]

Uploads all content from reader to the endpoint, consuming this Client.

Auto Trait Implementations

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl !UnwindSafe for Client

impl !RefUnwindSafe for Client

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err