pub struct CloudClient { /* private fields */ }Expand description
Cloud API client.
Implementations§
Source§impl CloudClient
impl CloudClient
Sourcepub fn new(base_url: &str, license_key: Option<String>) -> Self
pub fn new(base_url: &str, license_key: Option<String>) -> Self
Create a new cloud client.
base_url defaults to https://api.kardo.app if empty.
Sourcepub async fn verify_license(&self) -> Result<bool, CloudError>
pub async fn verify_license(&self) -> Result<bool, CloudError>
Verify the license key with the proxy server.
Returns Ok(true) if valid, Ok(false) if invalid,
or Err if the server is unreachable.
Sourcepub async fn analyze(
&self,
request: AnalyzeRequest,
) -> Result<AnalyzeResponse, CloudError>
pub async fn analyze( &self, request: AnalyzeRequest, ) -> Result<AnalyzeResponse, CloudError>
Send anonymized content for AI analysis.
The content should already be anonymized before calling this method.
Sourcepub async fn get_fix_suggestions(
&self,
issues: Vec<QualityIssue>,
context: &str,
) -> Result<Vec<FixSuggestion>, CloudError>
pub async fn get_fix_suggestions( &self, issues: Vec<QualityIssue>, context: &str, ) -> Result<Vec<FixSuggestion>, CloudError>
Get AI fix suggestions for specific quality issues.
Uses the /api/analyze endpoint with task="fix".
Auto Trait Implementations§
impl Freeze for CloudClient
impl !RefUnwindSafe for CloudClient
impl Send for CloudClient
impl Sync for CloudClient
impl Unpin for CloudClient
impl UnsafeUnpin for CloudClient
impl !UnwindSafe for CloudClient
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