pub struct Client<CTXEXT, PFN, RTRVL> {
pub profile_fetcher: Arc<PFN>,
pub retrieval_client: Arc<RTRVL>,
pub _ctx_ext: PhantomData<CTXEXT>,
}Expand description
Client for Profile operations.
Provides methods to list Profiles, retrieve Profile definitions, and get Profile usage statistics.
Fields§
§profile_fetcher: Arc<PFN>Fetcher for Profile definitions.
retrieval_client: Arc<RTRVL>Client for listing Profiles and getting usage statistics.
_ctx_ext: PhantomData<CTXEXT>Phantom data for context extension type.
Implementations§
Source§impl<CTXEXT, PFN, RTRVL> Client<CTXEXT, PFN, RTRVL>
impl<CTXEXT, PFN, RTRVL> Client<CTXEXT, PFN, RTRVL>
Sourcepub async fn list_profiles(
&self,
ctx: Context<CTXEXT>,
) -> Result<ListProfile, ResponseError>
pub async fn list_profiles( &self, ctx: Context<CTXEXT>, ) -> Result<ListProfile, ResponseError>
Lists all available Profiles.
Sourcepub async fn get_profile(
&self,
ctx: Context<CTXEXT>,
owner: &str,
repository: &str,
commit: Option<&str>,
) -> Result<GetProfile, ResponseError>
pub async fn get_profile( &self, ctx: Context<CTXEXT>, owner: &str, repository: &str, commit: Option<&str>, ) -> Result<GetProfile, ResponseError>
Retrieves a Profile definition by owner/repository/commit.
Sourcepub async fn get_profile_usage(
&self,
ctx: Context<CTXEXT>,
owner: &str,
repository: &str,
commit: Option<&str>,
) -> Result<UsageProfile, ResponseError>
pub async fn get_profile_usage( &self, ctx: Context<CTXEXT>, owner: &str, repository: &str, commit: Option<&str>, ) -> Result<UsageProfile, ResponseError>
Retrieves usage statistics for a Profile.
Auto Trait Implementations§
impl<CTXEXT, PFN, RTRVL> Freeze for Client<CTXEXT, PFN, RTRVL>
impl<CTXEXT, PFN, RTRVL> RefUnwindSafe for Client<CTXEXT, PFN, RTRVL>
impl<CTXEXT, PFN, RTRVL> Send for Client<CTXEXT, PFN, RTRVL>
impl<CTXEXT, PFN, RTRVL> Sync for Client<CTXEXT, PFN, RTRVL>
impl<CTXEXT, PFN, RTRVL> Unpin for Client<CTXEXT, PFN, RTRVL>where
CTXEXT: Unpin,
impl<CTXEXT, PFN, RTRVL> UnwindSafe for Client<CTXEXT, PFN, RTRVL>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more