Struct graph_http::DownloadClient
source · [−]pub struct DownloadClient<Client, Request> { /* private fields */ }
Expand description
Provides an abstraction for downloading files.
Implementations
sourceimpl DownloadClient<HttpClient<RefCell<GraphRequest<Client, Body, Form>>>, RefCell<DownloadRequest>>
impl DownloadClient<HttpClient<RefCell<GraphRequest<Client, Body, Form>>>, RefCell<DownloadRequest>>
pub fn new(client: BlockingClient) -> BlockingDownload
pub fn create_dir_all(&self, value: bool) -> &Self
pub fn is_create_dir_all(&self) -> bool
pub fn overwrite_existing_file(&self, value: bool) -> &Self
pub fn is_overwrite_existing_file(&self) -> bool
pub fn set_file_name(&self, value: OsString) -> &Self
pub fn set_extension(&self, value: &str) -> &Self
pub fn set_dir<P: AsRef<Path>>(&self, path: P) -> &Self
pub fn directory(&self) -> PathBuf
pub fn file_name(&self) -> Option<OsString>
pub fn extension(&self) -> Option<String>
pub fn url(&self) -> GraphUrl
pub fn format(&self, format: &str)
pub fn send(self) -> Result<PathBuf, BlockingDownloadError>
sourceimpl DownloadClient<HttpClient<Arc<Mutex<RawMutex, GraphRequest<Client, Body, Form>>>>, Arc<Mutex<RawMutex, DownloadRequest>>>
impl DownloadClient<HttpClient<Arc<Mutex<RawMutex, GraphRequest<Client, Body, Form>>>>, Arc<Mutex<RawMutex, DownloadRequest>>>
pub fn new_async(client: GraphRequest<Client, Body, Form>) -> AsyncDownload
pub fn create_dir_all(&self, value: bool) -> &Self
pub fn is_create_dir_all(&self) -> bool
pub fn overwrite_existing_file(&self, value: bool) -> &Self
pub fn is_overwrite_existing_file(&self) -> bool
pub fn set_file_name(&self, value: OsString) -> &Self
pub fn set_extension(&self, value: &str) -> &Self
pub fn set_dir<P: AsRef<Path>>(&self, path: P) -> &Self
pub fn directory(&self) -> PathBuf
pub fn file_name(&self) -> Option<OsString>
pub fn extension(&self) -> Option<String>
pub fn url(&self) -> GraphUrl
pub fn format(&self, format: &str)
pub async fn send(self) -> Result<PathBuf, AsyncDownloadError>
Auto Trait Implementations
impl<Client, Request> RefUnwindSafe for DownloadClient<Client, Request> where
Client: RefUnwindSafe,
Request: RefUnwindSafe,
impl<Client, Request> Send for DownloadClient<Client, Request> where
Client: Send,
Request: Send,
impl<Client, Request> Sync for DownloadClient<Client, Request> where
Client: Sync,
Request: Sync,
impl<Client, Request> Unpin for DownloadClient<Client, Request> where
Client: Unpin,
Request: Unpin,
impl<Client, Request> UnwindSafe for DownloadClient<Client, Request> where
Client: UnwindSafe,
Request: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more