pub struct Client<CTXEXT, FFN, RTRVL> {
pub function_fetcher: Arc<FFN>,
pub retrieval_client: Arc<RTRVL>,
pub _ctx_ext: PhantomData<CTXEXT>,
}Expand description
Client for function operations.
Fields§
§function_fetcher: Arc<FFN>Fetcher for Function definitions.
retrieval_client: Arc<RTRVL>Client for listing functions and getting usage statistics.
_ctx_ext: PhantomData<CTXEXT>Implementations§
Source§impl<CTXEXT, FFN, RTRVL> Client<CTXEXT, FFN, RTRVL>
impl<CTXEXT, FFN, RTRVL> Client<CTXEXT, FFN, RTRVL>
Sourcepub async fn list_functions(
&self,
ctx: Context<CTXEXT>,
) -> Result<ListFunction, ResponseError>
pub async fn list_functions( &self, ctx: Context<CTXEXT>, ) -> Result<ListFunction, ResponseError>
Lists functions.
Sourcepub async fn get_function(
&self,
ctx: Context<CTXEXT>,
owner: &str,
repository: &str,
commit: Option<&str>,
) -> Result<GetFunction, ResponseError>
pub async fn get_function( &self, ctx: Context<CTXEXT>, owner: &str, repository: &str, commit: Option<&str>, ) -> Result<GetFunction, ResponseError>
Retrieves a function by owner/repository/commit.
Sourcepub async fn get_function_usage(
&self,
ctx: Context<CTXEXT>,
owner: &str,
repository: &str,
commit: Option<&str>,
) -> Result<UsageFunction, ResponseError>
pub async fn get_function_usage( &self, ctx: Context<CTXEXT>, owner: &str, repository: &str, commit: Option<&str>, ) -> Result<UsageFunction, ResponseError>
Retrieves usage statistics for a function.
Auto Trait Implementations§
impl<CTXEXT, FFN, RTRVL> Freeze for Client<CTXEXT, FFN, RTRVL>
impl<CTXEXT, FFN, RTRVL> RefUnwindSafe for Client<CTXEXT, FFN, RTRVL>
impl<CTXEXT, FFN, RTRVL> Send for Client<CTXEXT, FFN, RTRVL>
impl<CTXEXT, FFN, RTRVL> Sync for Client<CTXEXT, FFN, RTRVL>
impl<CTXEXT, FFN, RTRVL> Unpin for Client<CTXEXT, FFN, RTRVL>where
CTXEXT: Unpin,
impl<CTXEXT, FFN, RTRVL> UnwindSafe for Client<CTXEXT, FFN, 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