Enum chris::EitherClient
source · pub enum EitherClient {
Anon(AnonChrisClient),
LoggedIn(ChrisClient),
}
Expand description
Either an anonymous client or a logged in user. A shoddy workaround for combining how enums work and how [AccessRw] and [AccessRo] could be represented using an enum.
Variants§
Anon(AnonChrisClient)
LoggedIn(ChrisClient)
Implementations§
source§impl EitherClient
impl EitherClient
sourcepub fn logged_in(self) -> Option<ChrisClient>
pub fn logged_in(self) -> Option<ChrisClient>
Get the client if this is logged in.
sourcepub fn logged_in_ref(&self) -> Option<&ChrisClient>
pub fn logged_in_ref(&self) -> Option<&ChrisClient>
Get the client if this is logged in.
Trait Implementations§
source§impl BaseChrisClient<RoAccess> for EitherClient
impl BaseChrisClient<RoAccess> for EitherClient
source§fn filebrowser(&self) -> FileBrowser
fn filebrowser(&self) -> FileBrowser
Get a filebrowser API client.
source§fn plugin(&self) -> PluginSearchBuilder<RoAccess>
fn plugin(&self) -> PluginSearchBuilder<RoAccess>
Search for ChRIS plugins.
source§fn pipeline(&self) -> PipelineSearchBuilder<RoAccess>
fn pipeline(&self) -> PipelineSearchBuilder<RoAccess>
Search for pipeines.
source§fn public_feeds(&self) -> FeedSearchBuilder<RoAccess>
fn public_feeds(&self) -> FeedSearchBuilder<RoAccess>
Search for public feeds.
source§fn get_feed<'a, 'async_trait>(
&'a self,
id: FeedId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<FeedResponse, RoAccess>, CubeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn get_feed<'a, 'async_trait>(
&'a self,
id: FeedId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<FeedResponse, RoAccess>, CubeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Get a feed (directly).
source§fn get_plugin_instance<'life0, 'async_trait>(
&'life0 self,
id: PluginInstanceId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<PluginInstanceResponse, RoAccess>, CubeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_plugin_instance<'life0, 'async_trait>(
&'life0 self,
id: PluginInstanceId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<PluginInstanceResponse, RoAccess>, CubeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a plugin instance (directly).
source§fn get_plugin<'life0, 'async_trait>(
&'life0 self,
id: PluginId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<PluginResponse, A>, GetOnlyError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_plugin<'life0, 'async_trait>(
&'life0 self,
id: PluginId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<PluginResponse, A>, GetOnlyError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get a plugin by ID
source§fn get_pipeline<'life0, 'async_trait>(
&'life0 self,
id: PipelineId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<PipelineResponse, A>, GetOnlyError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_pipeline<'life0, 'async_trait>(
&'life0 self,
id: PipelineId
) -> Pin<Box<dyn Future<Output = Result<LinkedModel<PipelineResponse, A>, GetOnlyError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get a pipeline by ID
Auto Trait Implementations§
impl Freeze for EitherClient
impl !RefUnwindSafe for EitherClient
impl Send for EitherClient
impl Sync for EitherClient
impl Unpin for EitherClient
impl !UnwindSafe for EitherClient
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