pub struct NoauthDefaultClient { /* private fields */ }
Available on crate feature
default_client
only.Expand description
Default HTTP client for unauthenticated API calls.
Implementations§
Source§impl NoauthDefaultClient
impl NoauthDefaultClient
Sourcepub fn set_path_root(&mut self, path_root: &PathRoot)
pub fn set_path_root(&mut self, path_root: &PathRoot)
Set a root which all subsequent paths are evaluated relative to.
The default, if this function is not called, is to behave as if it was called with
PathRoot::Home
.
See https://www.dropbox.com/developers/reference/path-root-header-modes for more information.
Trait Implementations§
Source§impl Debug for NoauthDefaultClient
impl Debug for NoauthDefaultClient
Source§impl Default for NoauthDefaultClient
impl Default for NoauthDefaultClient
Source§fn default() -> NoauthDefaultClient
fn default() -> NoauthDefaultClient
Returns the “default value” for a type. Read more
Source§impl HttpClient for NoauthDefaultClient
impl HttpClient for NoauthDefaultClient
Source§type Request = UreqRequest
type Request = UreqRequest
The concrete type of request supported by the client.
Source§fn execute(
&self,
request: Self::Request,
body: &[u8],
) -> Result<HttpRequestResultRaw, Error>
fn execute( &self, request: Self::Request, body: &[u8], ) -> Result<HttpRequestResultRaw, Error>
Make a HTTP request.
Source§fn new_request(&self, url: &str) -> Self::Request
fn new_request(&self, url: &str) -> Self::Request
Create a new request instance for the given URL. It should be a POST request.
Source§fn update_token(&self, _old_token: Arc<String>) -> Result<bool, Error>
fn update_token(&self, _old_token: Arc<String>) -> Result<bool, Error>
Attempt to update the current authentication token. The previously fetched token is given
as a way to avoid repeat updates in case of a race. If the update is successful, return
true
and the current request will be retried with a newly-fetched token. Return false
if
authentication is not supported, or return an error if the update operation fails.Source§fn team_select(&self) -> Option<&TeamSelect>
fn team_select(&self) -> Option<&TeamSelect>
The alternate user or team context currently set, if any.
impl NoauthClient for NoauthDefaultClient
Auto Trait Implementations§
impl Freeze for NoauthDefaultClient
impl !RefUnwindSafe for NoauthDefaultClient
impl Send for NoauthDefaultClient
impl Sync for NoauthDefaultClient
impl Unpin for NoauthDefaultClient
impl !UnwindSafe for NoauthDefaultClient
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
Source§impl<T> HttpClient for Twhere
T: HttpClient + Sync,
impl<T> HttpClient for Twhere
T: HttpClient + Sync,
Source§type Request = <T as HttpClient>::Request
type Request = <T as HttpClient>::Request
The concrete type of request supported by the client.
Source§async fn execute(
&self,
request: <T as HttpClient>::Request,
body: Bytes,
) -> Result<HttpRequestResultRaw, Error>
async fn execute( &self, request: <T as HttpClient>::Request, body: Bytes, ) -> Result<HttpRequestResultRaw, Error>
Make a HTTP request.
async fn execute_borrowed_body( &self, request: <T as HttpClient>::Request, body_slice: &[u8], ) -> Result<HttpRequestResultRaw, Error>
Source§fn new_request(&self, url: &str) -> <T as HttpClient>::Request
fn new_request(&self, url: &str) -> <T as HttpClient>::Request
Create a new request instance for the given URL. It should be a POST request.
Source§fn update_token(
&self,
old_token: Arc<String>,
) -> impl Future<Output = Result<bool, Error>> + Send
fn update_token( &self, old_token: Arc<String>, ) -> impl Future<Output = Result<bool, Error>> + Send
Attempt to update the current authentication token. The previously fetched token is given
as a way to avoid repeat updates in case of a race. If the update is successful, return
true
and the current request will be retried with a newly-fetched token. Return false
if
authentication is not supported, or return an error if the update operation fails.Source§fn team_select(&self) -> Option<&TeamSelect>
fn team_select(&self) -> Option<&TeamSelect>
The alternate user or team context currently set, if any.