Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Explicit connection/credential configuration; no session state is written to disk.

Implementations§

Source§

impl Client

Source

pub fn new(base_url: &str) -> Result<Self, Error>

Accepts a bare backend origin, /api/v1, or /api/v1/.

Source

pub fn with_bearer(self, token: impl Into<String>) -> Self

Source

pub fn with_test_key(self, key: impl Into<String>) -> Result<Self, Error>

Source

pub fn with_test_app_secret( self, secret: impl Into<String>, ) -> Result<Self, Error>

Selects an IAM sandbox using only the imported application’s secret.

Source

pub async fn contracts(&self) -> Result<Value, Error>

Live metadata for the selected environment. Never returns a secret.

Source

pub fn with_telemetry(self, enabled: bool) -> Self

Opts this client instance out of diagnostic telemetry.

Source

pub fn with_source(self, source: &'static str) -> Result<Self, Error>

Identifies the interface in request diagnostics; no command arguments are sent.

Source

pub async fn email_settings(&self) -> Result<Value, Error>

Reads this identity’s organization email preferences.

Source

pub async fn set_email_settings(&self, body: &Value) -> Result<Value, Error>

Replaces the organization email and event subscriptions.

Source

pub async fn report(&self, body: &Value) -> Result<Value, Error>

Queues a bug report for Commit maintainers; preserve the mutation across retries.

Source

pub async fn testing_context(&self) -> Result<Value, Error>

Source

pub async fn claim_project_task( &self, project: &str, task: &str, ) -> Result<Value, Error>

Atomically take an unassigned task.

Source

pub async fn delete_project_task( &self, project: &str, task: &str, ) -> Result<Value, Error>

Remove a task subtree and its linked todos.

Source

pub async fn project_versions( &self, project: &str, query: &[(&str, &str)], ) -> Result<Value, Error>

Retained project version metadata, newest first.

Source

pub async fn project_version( &self, project: &str, version: i64, ) -> Result<Value, Error>

One complete retained project snapshot.

Source

pub fn with_org_id(self, org_id: impl Into<String>) -> Self

Source

pub fn with_mutation(self, mutation: Mutation) -> Self

Attaches retry/precondition inputs to requests made through this clone.

Source

pub fn base_url(&self) -> &Url

Source

pub fn new_idempotency_key() -> String

Source

pub async fn health(&self) -> Result<Value, Error>

Source

pub async fn ready(&self) -> Result<Value, Error>

Source

pub async fn version(&self) -> Result<Value, Error>

Source

pub async fn iam(&self) -> Result<Value, Error>

Public IAM application metadata. Caller credentials and test context are omitted.

Source

pub async fn login_status(&self) -> Result<Value, Error>

Verify the current login against IAM and return its public actor identity. Missing or rejected credentials return authenticated: false; transport, permission, and server failures remain errors. No tokens are returned.

Source

pub async fn login_with_slt(&self, slt: &str) -> Result<SessionTokens, Error>

Source

pub async fn refresh_session( &self, refresh_token: &str, ) -> Result<SessionTokens, Error>

Source

pub async fn logout(&self, token: &str) -> Result<(), Error>

Source

pub async fn list_todos(&self, query: &[(&str, &str)]) -> Result<Value, Error>

GET /api/v1/todos.

Source

pub async fn get_todo(&self, todo_id: &str) -> Result<Value, Error>

GET /api/v1/todos/{todo_id}.

Source

pub async fn create_todo<T: Serialize + ?Sized>( &self, body: &T, ) -> Result<Value, Error>

POST /api/v1/todos.

Source

pub async fn update_todo<T: Serialize + ?Sized>( &self, todo_id: &str, body: &T, ) -> Result<Value, Error>

PATCH /api/v1/todos/{todo_id}.

Source

pub async fn delete_todo(&self, todo_id: &str) -> Result<Value, Error>

DELETE /api/v1/todos/{todo_id}.

Source

pub async fn list_notes( &self, todo_id: &str, query: &[(&str, &str)], ) -> Result<Value, Error>

GET /api/v1/todos/{todo_id}/notes.

Source

pub async fn add_note<T: Serialize + ?Sized>( &self, todo_id: &str, body: &T, ) -> Result<Value, Error>

POST /api/v1/todos/{todo_id}/notes.

Source

pub async fn todo_subscription(&self, todo_id: &str) -> Result<Value, Error>

GET /api/v1/todos/{todo_id}/notification-subscription.

Source

pub async fn replace_todo_subscription<T: Serialize + ?Sized>( &self, todo_id: &str, body: &T, ) -> Result<Value, Error>

PUT /api/v1/todos/{todo_id}/notification-subscription.

Source

pub async fn notification_settings(&self) -> Result<Value, Error>

GET /api/v1/notification-settings.

Source

pub async fn update_notification_settings<T: Serialize + ?Sized>( &self, body: &T, ) -> Result<Value, Error>

PUT /api/v1/notification-settings.

Source

pub async fn list_projects( &self, query: &[(&str, &str)], ) -> Result<Value, Error>

GET /api/v1/projects.

Source

pub async fn get_project(&self, project_id: &str) -> Result<Value, Error>

GET /api/v1/projects/{project_id}.

Source

pub async fn create_project<T: Serialize + ?Sized>( &self, body: &T, ) -> Result<Value, Error>

POST /api/v1/projects.

Source

pub async fn update_project<T: Serialize + ?Sized>( &self, project_id: &str, body: &T, ) -> Result<Value, Error>

PATCH /api/v1/projects/{project_id}.

Source

pub async fn project_diary(&self, project_id: &str) -> Result<Value, Error>

GET /api/v1/projects/{project_id}/diary.

Source

pub async fn replace_project_diary<T: Serialize + ?Sized>( &self, project_id: &str, body: &T, ) -> Result<Value, Error>

PUT /api/v1/projects/{project_id}/diary.

Source

pub async fn project_tasks( &self, project_id: &str, query: &[(&str, &str)], ) -> Result<Value, Error>

GET /api/v1/projects/{project_id}/tasks.

Source

pub async fn project_entries( &self, project_id: &str, query: &[(&str, &str)], ) -> Result<Value, Error>

GET /api/v1/projects/{project_id}/entries.

Source

pub async fn create_project_task<T: Serialize + ?Sized>( &self, project_id: &str, body: &T, ) -> Result<Value, Error>

POST /api/v1/projects/{project_id}/tasks.

Source

pub async fn update_project_task<T: Serialize + ?Sized>( &self, project_id: &str, task_id: &str, body: &T, ) -> Result<Value, Error>

PATCH /api/v1/projects/{project_id}/tasks/{task_id}.

Source

pub async fn create_project_blocker<T: Serialize + ?Sized>( &self, project_id: &str, body: &T, ) -> Result<Value, Error>

POST /api/v1/projects/{project_id}/blockers.

Source

pub async fn create_project_update<T: Serialize + ?Sized>( &self, project_id: &str, body: &T, ) -> Result<Value, Error>

POST /api/v1/projects/{project_id}/updates.

Source

pub async fn complete_project<T: Serialize + ?Sized>( &self, project_id: &str, body: &T, ) -> Result<Value, Error>

POST /api/v1/projects/{project_id}/completion.

Source

pub async fn list_test_environments(&self) -> Result<Value, Error>

GET /api/v1/test-environments.

Source

pub async fn create_test_environment<T: Serialize + ?Sized>( &self, body: &T, ) -> Result<Value, Error>

Legacy creation route, retained for source compatibility. New creation returns honeycomb_manages_testing_lifecycle; create through Honeycomb.

Source

pub async fn retrieve_test_environment_key( &self, id: &str, ) -> Result<Value, Error>

GET /api/v1/test-environments/{id}/key.

Source

pub async fn rotate_test_environment(&self, id: &str) -> Result<Value, Error>

POST /api/v1/test-environments/{id}/rotate.

Source

pub async fn delete_test_environment(&self, id: &str) -> Result<Value, Error>

DELETE /api/v1/test-environments/{id}.

Source

pub async fn restore_test_environment(&self, id: &str) -> Result<Value, Error>

Source

pub async fn clean_test_environment(&self, id: &str) -> Result<Value, Error>

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more