Skip to main content

Client

Struct Client 

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

ClickHouse Cloud API client.

Supports both HTTP Basic Auth (API key/secret) and Bearer token (OAuth) authentication.

Implementations§

Source§

impl Client

Source

pub fn new(key_id: impl Into<String>, key_secret: impl Into<String>) -> Self

Create a new client with the default base URL (https://api.clickhouse.cloud).

Source

pub fn with_base_url( base_url: impl Into<String>, key_id: impl Into<String>, key_secret: impl Into<String>, ) -> Self

Create a new client with a custom base URL.

Source

pub fn with_bearer_token( base_url: impl Into<String>, token: impl Into<String>, ) -> Self

Create a new client with Bearer token authentication and a custom base URL.

Source

pub fn with_http_client( http: Client, base_url: impl Into<String>, key_id: impl Into<String>, key_secret: impl Into<String>, ) -> Self

Create a new client with a pre-built HTTP client and Basic auth.

Use this when you need to customize the underlying reqwest::Client (e.g. to set a custom user-agent or timeout).

Source

pub fn with_http_client_bearer( http: Client, base_url: impl Into<String>, token: impl Into<String>, ) -> Self

Create a new client with a pre-built HTTP client and Bearer auth.

Use this when you need to customize the underlying reqwest::Client (e.g. to set a custom user-agent or timeout).

Source

pub fn set_bearer_token( &mut self, token: impl Into<String>, ) -> Result<(), Error>

Replace the Bearer token without rebuilding the client.

Useful for refreshing an expired OAuth token. Returns an error if the client is using Basic auth.

Source

pub fn with_query_host(self, host: impl Into<String>) -> Self

Override the Query API host used by Client::run_query and Client::run_query_bearer.

When not set, the host is taken from the CLICKHOUSE_CLOUD_QUERY_HOST env var if present, otherwise derived from the client’s base URL (api.<domain>queries.<domain>), falling back to the production host https://queries.clickhouse.cloud.

Source

pub async fn run_query( &self, service_id: &str, key_id: &str, key_secret: &str, sql: &str, database: Option<&str>, format: &str, wake_service: bool, ) -> Result<Response, Error>

Run a SQL statement against a service’s Query API endpoint.

Hits the environment’s query host (see Client::with_query_host for resolution order) using Basic auth with the provided key_id/key_secret — a per-service key bound to a query endpoint with role sql_console_read_only (or sql_console_admin). This bypasses the client’s primary auth because Query API keys are scoped to a single service.

wake_service resends the wake confirmation the query host asks for when the target service is idled — see Error::ServiceIdle.

Returns the streaming response so the caller can forward it to stdout or buffer it into memory.

Source

pub async fn run_query_bearer( &self, service_id: &str, sql: &str, database: Option<&str>, format: &str, wake_service: bool, ) -> Result<Response, Error>

Run a SQL statement against a service’s Query API endpoint using the client’s own OAuth Bearer token.

Unlike Client::run_query, no per-service Query API key and no query-endpoint configuration are needed: the Query API authenticates the user’s identity directly (SQL-console style), and SQL permissions follow the user’s console role.

wake_service resends the wake confirmation the query host asks for when the target service is idled — see Error::ServiceIdle.

Returns an error if the client is using Basic auth.

Source

pub async fn organization_get_list( &self, ) -> Result<ApiResponse<Vec<Organization>>, Error>

Get list of available organizations

Source

pub async fn organization_get( &self, organization_id: &str, ) -> Result<ApiResponse<Organization>, Error>

Get organization details

Source

pub async fn organization_update( &self, organization_id: &str, body: &OrganizationPatchRequest, ) -> Result<ApiResponse<Organization>, Error>

Update organization details

Source

pub async fn activity_get_list( &self, organization_id: &str, from_date: Option<&str>, to_date: Option<&str>, ) -> Result<ApiResponse<Vec<Activity>>, Error>

List of organization activities

Source

pub async fn activity_get( &self, organization_id: &str, activity_id: &str, ) -> Result<ApiResponse<Activity>, Error>

Organization activity

Source

pub async fn organization_byoc_infrastructure_create( &self, organization_id: &str, body: &ByocInfrastructurePostRequest, ) -> Result<ApiResponse<ByocConfig>, Error>

Create BYOC Infrastructure

Source

pub async fn organization_byoc_infrastructure_delete( &self, organization_id: &str, byoc_infrastructure_id: &str, ) -> Result<ApiResponse<Value>, Error>

Remove a BYOC infrastructure

Source

pub async fn organization_byoc_infrastructure_update( &self, organization_id: &str, byoc_infrastructure_id: &str, body: &ByocInfrastructurePatchRequest, ) -> Result<ApiResponse<ByocConfig>, Error>

Update BYOC Infrastructure

Source

pub async fn invitation_get_list( &self, organization_id: &str, ) -> Result<ApiResponse<Vec<Invitation>>, Error>

List all invitations

Source

pub async fn invitation_create( &self, organization_id: &str, body: &InvitationPostRequest, ) -> Result<ApiResponse<Invitation>, Error>

Create an invitation

Source

pub async fn invitation_get( &self, organization_id: &str, invitation_id: &str, ) -> Result<ApiResponse<Invitation>, Error>

Get invitation details

Source

pub async fn invitation_delete( &self, organization_id: &str, invitation_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete organization invitation

Source

pub async fn openapi_key_get_list( &self, organization_id: &str, ) -> Result<ApiResponse<Vec<ApiKey>>, Error>

Get list of all keys

Source

pub async fn openapi_key_create( &self, organization_id: &str, body: &ApiKeyPostRequest, ) -> Result<ApiResponse<ApiKeyPostResponse>, Error>

Create key

Source

pub async fn openapi_key_get( &self, organization_id: &str, key_id: &str, ) -> Result<ApiResponse<ApiKey>, Error>

Get key details

Source

pub async fn openapi_key_update( &self, organization_id: &str, key_id: &str, body: &ApiKeyPatchRequest, ) -> Result<ApiResponse<ApiKey>, Error>

Update key

Source

pub async fn openapi_key_delete( &self, organization_id: &str, key_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete key

Source

pub async fn member_get_list( &self, organization_id: &str, ) -> Result<ApiResponse<Vec<Member>>, Error>

List organization members

Source

pub async fn member_get( &self, organization_id: &str, user_id: &str, ) -> Result<ApiResponse<Member>, Error>

Get member details

Source

pub async fn member_update( &self, organization_id: &str, user_id: &str, body: &MemberPatchRequest, ) -> Result<ApiResponse<Member>, Error>

Update organization member

Source

pub async fn member_delete( &self, organization_id: &str, user_id: &str, ) -> Result<ApiResponse<Value>, Error>

Remove an organization member

Source

pub async fn organization_roles_get_list( &self, organization_id: &str, ) -> Result<ApiResponse<Vec<RBACRole>>, Error>

List all available roles for an organization

Source

pub async fn organization_role_post( &self, organization_id: &str, body: &RoleCreateRequest, ) -> Result<ApiResponse<RBACRole>, Error>

Create a new role

Source

pub async fn organization_role_get( &self, organization_id: &str, role_id: &str, ) -> Result<ApiResponse<RBACRole>, Error>

Get role details

Source

pub async fn organization_role_patch( &self, organization_id: &str, role_id: &str, body: &RoleUpdateRequest, ) -> Result<ApiResponse<RBACRole>, Error>

Update a role

Source

pub async fn organization_role_delete( &self, organization_id: &str, role_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete a role

Source

pub async fn postgres_service_create( &self, organization_id: &str, body: &PostgresServicePostRequest, ) -> Result<ApiResponse<PostgresService>, Error>

Create new Postgres service

Source

pub async fn postgres_service_get_list( &self, organization_id: &str, ) -> Result<ApiResponse<Vec<PostgresServiceListItem>>, Error>

List of organization Postgres services

Source

pub async fn postgres_service_get( &self, organization_id: &str, postgres_id: &str, ) -> Result<ApiResponse<PostgresService>, Error>

Get PostgreSQL service details

Source

pub async fn postgres_service_delete( &self, organization_id: &str, postgres_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete a PostgreSQL service

Source

pub async fn postgres_service_patch( &self, organization_id: &str, postgres_id: &str, body: &PostgresServicePatchRequest, ) -> Result<ApiResponse<PostgresService>, Error>

Update a PostgreSQL service

Source

pub async fn postgres_service_certs_get( &self, organization_id: &str, postgres_id: &str, ) -> Result<String, Error>

Get Postgres CA certs

Source

pub async fn postgres_instance_config_get( &self, organization_id: &str, postgres_id: &str, ) -> Result<ApiResponse<PostgresInstanceConfig>, Error>

Get PostgreSQL service configuration

Source

pub async fn postgres_instance_config_post( &self, organization_id: &str, postgres_id: &str, body: &PostgresInstanceConfig, ) -> Result<ApiResponse<PostgresInstanceUpdateConfigResponse>, Error>

Replace Postgres service configuration

Source

pub async fn postgres_instance_config_patch( &self, organization_id: &str, postgres_id: &str, body: &PostgresInstanceConfig, ) -> Result<ApiResponse<PostgresInstanceUpdateConfigResponse>, Error>

Update Postgres service configuration

Source

pub async fn postgres_service_set_password( &self, organization_id: &str, postgres_id: &str, body: &PostgresServiceSetPassword, ) -> Result<ApiResponse<PostgresServicePasswordResource>, Error>

Update Postgres superuser password

Source

pub async fn postgres_instance_create_read_replica( &self, organization_id: &str, postgres_id: &str, body: &PostgresServiceReadReplicaRequest, ) -> Result<ApiResponse<PostgresService>, Error>

Create a read replica for a Postgres service

Source

pub async fn postgres_instance_prometheus_get( &self, organization_id: &str, postgres_id: &str, ) -> Result<String, Error>

Get PostgreSQL service metrics

Source

pub async fn postgres_org_prometheus_get( &self, organization_id: &str, ) -> Result<String, Error>

Get organization PostgreSQL metrics

Source

pub async fn postgres_instance_restore( &self, organization_id: &str, postgres_id: &str, body: &PostgresServiceRestoreRequest, ) -> Result<ApiResponse<PostgresService>, Error>

Restore a Postgres service

Source

pub async fn postgres_service_patch_state( &self, organization_id: &str, postgres_id: &str, body: &PostgresServiceSetState, ) -> Result<ApiResponse<PostgresService>, Error>

Update Postgres service state

Source

pub async fn organization_private_endpoint_config_get_list( &self, organization_id: &str, cloud_provider: &str, region_id: &str, ) -> Result<ApiResponse<OrganizationCloudRegionPrivateEndpointConfig>, Error>

👎Deprecated

Get private endpoint configuration for region within cloud provider for an organization

Source

pub async fn organization_prometheus_get( &self, organization_id: &str, filtered_metrics: Option<&str>, ) -> Result<String, Error>

Get organization metrics

Source

pub async fn instance_get_list( &self, organization_id: &str, filters: &[&str], ) -> Result<ApiResponse<Vec<Service>>, Error>

List of organization services

Source

pub async fn instance_create( &self, organization_id: &str, body: &ServicePostRequest, ) -> Result<ApiResponse<ServicePostResponse>, Error>

Create new service

Source

pub async fn instance_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Service>, Error>

Get service details

Source

pub async fn instance_update( &self, organization_id: &str, service_id: &str, body: &ServicePatchRequest, ) -> Result<ApiResponse<Service>, Error>

Update service basic details

Source

pub async fn instance_delete( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete service

Source

pub async fn backup_bucket_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<BackupBucket>, Error>

Get service backup bucket

Source

pub async fn backup_bucket_create( &self, organization_id: &str, service_id: &str, body: &BackupBucketPostRequest, ) -> Result<ApiResponse<BackupBucket>, Error>

Create service backup bucket

Source

pub async fn backup_bucket_update( &self, organization_id: &str, service_id: &str, body: &BackupBucketPatchRequest, ) -> Result<ApiResponse<BackupBucket>, Error>

Update service backup bucket

Source

pub async fn backup_bucket_delete( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete service backup bucket

Source

pub async fn backup_configuration_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<BackupConfiguration>, Error>

Get service backup configuration

Source

pub async fn backup_configuration_update( &self, organization_id: &str, service_id: &str, body: &BackupConfigurationPatchRequest, ) -> Result<ApiResponse<BackupConfiguration>, Error>

Update service backup configuration

Source

pub async fn backup_get_list( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<Backup>>, Error>

List of service backups

Source

pub async fn backup_get( &self, organization_id: &str, service_id: &str, backup_id: &str, ) -> Result<ApiResponse<Backup>, Error>

Get backup details

Source

pub async fn click_pipe_get_list( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<ClickPipe>>, Error>

List ClickPipes

Source

pub async fn click_pipe_create( &self, organization_id: &str, service_id: &str, body: &ClickPipePostRequest, ) -> Result<ApiResponse<ClickPipe>, Error>

Create ClickPipe

Source

pub async fn click_pipe_get( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, ) -> Result<ApiResponse<ClickPipe>, Error>

Get ClickPipe

Source

pub async fn click_pipe_update( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, body: &ClickPipePatchRequest, ) -> Result<ApiResponse<ClickPipe>, Error>

Update ClickPipe

Source

pub async fn click_pipe_delete( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete ClickPipe

Source

pub async fn click_pipe_scaling_update( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, body: &ClickPipeScalingPatchRequest, ) -> Result<ApiResponse<ClickPipe>, Error>

Update ClickPipe scaling

Source

pub async fn click_pipe_settings_get( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, ) -> Result<ApiResponse<ClickPipeSettings>, Error>

Get ClickPipe settings

Source

pub async fn click_pipe_settings_update( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, body: &ClickPipeSettingsPutRequest, ) -> Result<ApiResponse<ClickPipeSettings>, Error>

Update ClickPipe settings

Source

pub async fn click_pipe_state_update( &self, organization_id: &str, service_id: &str, click_pipe_id: &str, body: &ClickPipeStatePatchRequest, ) -> Result<ApiResponse<ClickPipe>, Error>

Update ClickPipe state

Source

pub async fn click_pipe_cdc_scaling_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<ClickPipesCdcScaling>, Error>

Get CDC ClickPipes scaling

Source

pub async fn click_pipe_cdc_scaling_update( &self, organization_id: &str, service_id: &str, body: &ClickPipesCdcScalingPatchRequest, ) -> Result<ApiResponse<ClickPipesCdcScaling>, Error>

Update CDC ClickPipes scaling

Source

pub async fn click_pipe_reverse_private_endpoint_get_list( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<ReversePrivateEndpoint>>, Error>

List reverse private endpoints

Source

pub async fn click_pipe_reverse_private_endpoint_create( &self, organization_id: &str, service_id: &str, body: &CreateReversePrivateEndpoint, ) -> Result<ApiResponse<ReversePrivateEndpoint>, Error>

Create reverse private endpoint

Source

pub async fn click_pipe_reverse_private_endpoint_get( &self, organization_id: &str, service_id: &str, reverse_private_endpoint_id: &str, ) -> Result<ApiResponse<ReversePrivateEndpoint>, Error>

Get reverse private endpoint

Source

pub async fn click_pipe_reverse_private_endpoint_delete( &self, organization_id: &str, service_id: &str, reverse_private_endpoint_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete reverse private endpoint

Source

pub async fn click_stack_list_alerts( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<ClickStackAlertResponse>>, Error>

ClickStack: List Alerts

Source

pub async fn click_stack_create_alert( &self, organization_id: &str, service_id: &str, body: &ClickStackCreateAlertRequest, ) -> Result<ApiResponse<ClickStackAlertResponse>, Error>

ClickStack: Create Alert

Source

pub async fn click_stack_get_alert( &self, organization_id: &str, service_id: &str, click_stack_alert_id: &str, ) -> Result<ApiResponse<ClickStackAlertResponse>, Error>

ClickStack: Get Alert

Source

pub async fn click_stack_update_alert( &self, organization_id: &str, service_id: &str, click_stack_alert_id: &str, body: &ClickStackUpdateAlertRequest, ) -> Result<ApiResponse<ClickStackAlertResponse>, Error>

ClickStack: Update Alert

Source

pub async fn click_stack_delete_alert( &self, organization_id: &str, service_id: &str, click_stack_alert_id: &str, ) -> Result<ApiResponse<Value>, Error>

ClickStack: Delete Alert

Source

pub async fn click_stack_list_dashboards( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<ClickStackDashboardResponse>>, Error>

ClickStack: List Dashboards

Source

pub async fn click_stack_create_dashboard( &self, organization_id: &str, service_id: &str, body: &ClickStackCreateDashboardRequest, ) -> Result<ApiResponse<ClickStackDashboardResponse>, Error>

ClickStack: Create Dashboard

Source

pub async fn click_stack_get_dashboard( &self, organization_id: &str, service_id: &str, click_stack_dashboard_id: &str, ) -> Result<ApiResponse<ClickStackDashboardResponse>, Error>

ClickStack: Get Dashboard

Source

pub async fn click_stack_update_dashboard( &self, organization_id: &str, service_id: &str, click_stack_dashboard_id: &str, body: &ClickStackUpdateDashboardRequest, ) -> Result<ApiResponse<ClickStackDashboardResponse>, Error>

ClickStack: Update Dashboard

Source

pub async fn click_stack_delete_dashboard( &self, organization_id: &str, service_id: &str, click_stack_dashboard_id: &str, ) -> Result<ApiResponse<Value>, Error>

ClickStack: Delete Dashboard

Source

pub async fn click_stack_list_sources( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<ClickStackSource>>, Error>

ClickStack: List Sources

Source

pub async fn click_stack_list_webhooks( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Vec<ClickStackWebhook>>, Error>

ClickStack: List Webhooks

Source

pub async fn instance_password_update( &self, organization_id: &str, service_id: &str, body: &ServicePasswordPatchRequest, ) -> Result<ApiResponse<ServicePasswordPatchResponse>, Error>

Update service password

Source

pub async fn instance_private_endpoint_create( &self, organization_id: &str, service_id: &str, body: &ServicPrivateEndpointePostRequest, ) -> Result<ApiResponse<InstancePrivateEndpoint>, Error>

Create a private endpoint

Source

pub async fn instance_private_endpoint_config_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<PrivateEndpointConfig>, Error>

Get private endpoint configuration

Source

pub async fn instance_prometheus_get( &self, organization_id: &str, service_id: &str, filtered_metrics: Option<&str>, ) -> Result<String, Error>

Get service metrics

Source

pub async fn instance_replica_scaling_update( &self, organization_id: &str, service_id: &str, body: &ServiceReplicaScalingPatchRequest, ) -> Result<ApiResponse<ServiceScalingPatchResponse>, Error>

Update service auto scaling settings

Source

pub async fn instance_scaling_update( &self, organization_id: &str, service_id: &str, body: &ServiceScalingPatchRequest, ) -> Result<ApiResponse<Service>, Error>

👎Deprecated

Update service auto scaling settings

Source

pub async fn scaling_schedule_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<ScalingSchedule>, Error>

Get service autoscaling schedule

Source

pub async fn scaling_schedule_upsert( &self, organization_id: &str, service_id: &str, body: &ScalingSchedulePostRequest, ) -> Result<ApiResponse<ScalingSchedule>, Error>

Create or replace service autoscaling schedule

Source

pub async fn scaling_schedule_delete( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete service scheduled scaling

Source

pub async fn upgrade_window_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<UpgradeWindow>, Error>

Get service upgrade window

Source

pub async fn upgrade_window_update( &self, organization_id: &str, service_id: &str, body: &UpgradeWindowPutRequest, ) -> Result<ApiResponse<UpgradeWindow>, Error>

Set service upgrade window

Source

pub async fn upgrade_window_delete( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete service upgrade window

Source

pub async fn instance_query_endpoint_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<ServiceQueryAPIEndpoint>, Error>

Get the service query endpoint for a given instance

Source

pub async fn instance_query_endpoint_delete( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<Value>, Error>

Delete the service query endpoint for a given instance

Source

pub async fn instance_query_endpoint_upsert( &self, organization_id: &str, service_id: &str, body: &InstanceServiceQueryApiEndpointsPostRequest, ) -> Result<ApiResponse<ServiceQueryAPIEndpoint>, Error>

Upsert the service query endpoint for a given instance

Source

pub async fn instance_state_update( &self, organization_id: &str, service_id: &str, body: &ServiceStatePatchRequest, ) -> Result<ApiResponse<Service>, Error>

Update service state

Source

pub async fn usage_cost_get( &self, organization_id: &str, from_date: &str, to_date: &str, filters: &[&str], ) -> Result<ApiResponse<UsageCost>, Error>

Get organization usage costs

Source

pub async fn service_clickhouse_settings_list_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<ServiceClickhouseSettingsList>, Error>

List ClickHouse settings

Source

pub async fn service_clickhouse_settings_update( &self, organization_id: &str, service_id: &str, body: &ServiceClickhouseSettingsPatchRequest, ) -> Result<ApiResponse<ServiceClickhouseSettingsPatchResponse>, Error>

Update ClickHouse settings

Source

pub async fn service_clickhouse_settings_schema_get( &self, organization_id: &str, service_id: &str, ) -> Result<ApiResponse<ServiceClickhouseSettingsSchema>, Error>

Get ClickHouse settings schema

Source

pub async fn service_clickhouse_setting_get( &self, organization_id: &str, service_id: &str, setting_name: &str, ) -> Result<ApiResponse<ServiceClickhouseSetting>, Error>

Get ClickHouse setting

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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