Struct endbasic_client::CloudService
source · [−]pub struct CloudService { /* private fields */ }
Expand description
An implementation of the EndBASIC service client that talks to a remote server.
Implementations
Trait Implementations
sourceimpl Service for CloudService
impl Service for CloudService
sourcefn signup<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 SignupRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn signup<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 SignupRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Interactively creates an account based on the details provided in request
.
sourcefn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<LoginResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<LoginResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sends an authentication request to the service with username
and password
to obtain an
access token for the session. Read more
sourcefn logout<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn logout<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Logs out from the service and clears the access token from this object.
sourcefn is_logged_in(&self) -> bool
fn is_logged_in(&self) -> bool
Checks if there is an active session against the service.
sourcefn logged_in_username(&self) -> Option<String>
fn logged_in_username(&self) -> Option<String>
Returns the logged in username if there is an active session.
sourcefn get_files<'life0, 'life1, 'async_trait>(
&'life0 mut self,
username: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<GetFilesResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_files<'life0, 'life1, 'async_trait>(
&'life0 mut self,
username: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<GetFilesResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sends a request to the server to obtain the list of files owned by username
with a
previously-acquired access_token
. Read more
sourcefn get_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
filename: &'life2 str,
request: &'life3 GetFileRequest
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn get_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
filename: &'life2 str,
request: &'life3 GetFileRequest
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sends a request to the server to obtain the metadata and/or the contents of filename
owned
by username
as specified in request
with a previously-acquired access_token
. Read more
sourcefn patch_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
filename: &'life2 str,
request: &'life3 PatchFileRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn patch_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
filename: &'life2 str,
request: &'life3 PatchFileRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sends a request to the server to update the metadata and/or the contents of filename
owned
by username
as specified in request
with a previously-acquired access_token
. Read more
sourcefn delete_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
filename: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn delete_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
filename: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sends a request to the server to delete filename
owned by username
with a
previously-acquired access_token
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CloudService
impl !Send for CloudService
impl !Sync for CloudService
impl Unpin for CloudService
impl !UnwindSafe for CloudService
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>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
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