Skip to main content

ComposioClient

Struct ComposioClient 

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

Main client for interacting with Composio API

The client manages HTTP connections and configuration for all API requests. It includes automatic retry logic for transient failures and proper error handling.

§Example

use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

Implementations§

Source§

impl ComposioClient

Source

pub fn builder() -> ComposioClientBuilder

Create a new client builder

Returns a ComposioClientBuilder that can be used to configure and build a ComposioClient instance.

§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;
Source

pub fn http_client(&self) -> &Client

Get a reference to the HTTP client

This is useful for advanced use cases where you need direct access to the underlying reqwest client.

Source

pub fn config(&self) -> &ComposioConfig

Get a reference to the configuration

Returns the configuration used by this client.

Source

pub fn create_session(&self, user_id: impl Into<String>) -> SessionBuilder<'_>

Create a new session for a user

Returns a SessionBuilder that can be used to configure and create a Tool Router session for the specified user.

§Arguments
  • user_id - User identifier for session isolation
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let session = client
    .create_session("user_123")
    .toolkits(vec!["github", "gmail"])
    .send()
    .await?;
Source

pub async fn get_session( &self, session_id: impl Into<String>, ) -> Result<Session, ComposioError>

Get an existing session by ID

Retrieves session details for a previously created Tool Router session. This is useful for inspecting session configuration and available tools.

§Arguments
  • session_id - The session ID to retrieve
§Errors

Returns an error if:

  • Session not found (404)
  • Network error occurs
  • API returns an error response
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let session = client.get_session("sess_abc123").await?;
println!("Session ID: {}", session.session_id());
Source

pub async fn create_mcp_server( &self, params: MCPCreateParams, ) -> Result<MCPCreateResponse, ComposioError>

Create an MCP server

Source

pub async fn get_mcp_server( &self, id: impl Into<String>, ) -> Result<MCPItem, ComposioError>

Retrieve an MCP server by ID

Source

pub async fn update_mcp_server( &self, id: impl Into<String>, params: MCPUpdateParams, ) -> Result<MCPUpdateResponse, ComposioError>

Update an MCP server

Source

pub async fn delete_mcp_server( &self, id: impl Into<String>, ) -> Result<MCPDeleteResponse, ComposioError>

Delete an MCP server by ID

Source

pub async fn list_mcp_servers( &self, params: MCPListParams, ) -> Result<MCPListResponse, ComposioError>

List MCP servers

Source

pub async fn list_mcp_servers_for_app( &self, params: MCPRetrieveAppParams, ) -> Result<MCPRetrieveAppResponse, ComposioError>

List MCP servers for app-scoped retrieval endpoint

Source

pub async fn generate_mcp_server( &self, params: MCPGenerateUrlParams, ) -> Result<MCPGenerateUrlResponse, ComposioError>

Generate MCP URLs for users and/or connected accounts

Source

pub async fn create_custom_mcp_server( &self, params: MCPCustomCreateParams, ) -> Result<MCPCustomCreateResponse, ComposioError>

Create a custom MCP server

Source

pub async fn get_migration_nanoid( &self, params: MigrationGetNanoIdParams, ) -> Result<MigrationGetNanoIdResponse, ComposioError>

Convert a legacy UUID to NanoId for a supported resource type.

Source

pub async fn create_cli_session( &self, ) -> Result<CliCreateSessionResponse, ComposioError>

Create a new CLI session.

Source

pub async fn get_cli_session( &self, params: CliGetSessionParams, ) -> Result<CliGetSessionResponse, ComposioError>

Retrieve a CLI session using UUID or code.

Source

pub async fn get_project_config( &self, ) -> Result<ProjectConfigResponse, ComposioError>

Retrieve project configuration.

Source

pub async fn update_project_config( &self, params: ProjectConfigUpdateParams, ) -> Result<ProjectConfigResponse, ComposioError>

Update project configuration.

Source

pub async fn list_connected_accounts( &self, params: ConnectedAccountListParams, ) -> Result<ConnectedAccountListResponse, ComposioError>

List connected accounts

Retrieves a list of connected accounts based on the provided filters.

§Arguments
  • params - Filter parameters for the query
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::connected_accounts::ConnectedAccountListParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = ConnectedAccountListParams {
    user_ids: Some(vec!["user_123".to_string()]),
    toolkit_slugs: Some(vec!["github".to_string()]),
    ..Default::default()
};

let accounts = client.list_connected_accounts(params).await?;
Source

pub async fn get_connected_account( &self, account_id: impl Into<String>, ) -> Result<ConnectedAccountInfo, ComposioError>

Get a specific connected account by ID

§Arguments
  • account_id - The connected account ID
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let account = client.get_connected_account("ca_abc123").await?;

Create a direct connected-account auth link.

Source

pub async fn refresh_connected_account( &self, account_id: impl Into<String>, params: ConnectedAccountRefreshParams, ) -> Result<ConnectedAccountRefreshResponse, ComposioError>

Refresh a connected account’s authentication state.

Source

pub async fn update_connected_account_status( &self, account_id: impl Into<String>, params: ConnectedAccountUpdateStatusParams, ) -> Result<ConnectedAccountUpdateStatusResponse, ComposioError>

Enable or disable a connected account.

Source

pub async fn delete_connected_account( &self, account_id: impl Into<String>, ) -> Result<ConnectedAccountDeleteResponse, ComposioError>

Delete a connected account.

Source

pub async fn list_files( &self, params: FileListParams, ) -> Result<FileListResponse, ComposioError>

List files available in the project.

Source

pub async fn create_file_upload_request( &self, params: FileCreatePresignedUrlParams, ) -> Result<FileCreatePresignedUrlResponse, ComposioError>

Request a presigned upload URL for a file.

Source

pub async fn list_toolkits( &self, params: ToolkitListParams, ) -> Result<ToolkitListResponse, ComposioError>

List all toolkits

Retrieves a list of available toolkits based on the provided filters. Toolkits are collections of tools that can be used to perform various tasks.

§Arguments
  • params - Filter parameters for the query
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::toolkits::ToolkitListParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = ToolkitListParams {
    category: Some("communication".to_string()),
    limit: Some(20),
    ..Default::default()
};

let toolkits = client.list_toolkits(params).await?;
for toolkit in toolkits.items {
    println!("Toolkit: {} ({})", toolkit.name, toolkit.slug);
}
Source

pub async fn get_toolkit( &self, slug: impl Into<String>, ) -> Result<ToolkitRetrieveResponse, ComposioError>

Get a specific toolkit by slug

Retrieves detailed information about a specific toolkit including authentication schemes, available tools, and configuration details.

§Arguments
  • slug - The toolkit slug (e.g., “github”, “gmail”, “slack”)
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let toolkit = client.get_toolkit("github").await?;
println!("Toolkit: {}", toolkit.name);
println!("Auth schemes: {:?}", toolkit.auth_schemes);
Source

pub async fn get_toolkit_with_params( &self, slug: impl Into<String>, params: ToolkitRetrieveParams, ) -> Result<ToolkitRetrieveResponse, ComposioError>

Get a specific toolkit by slug with optional query parameters.

Source

pub async fn list_toolkit_categories( &self, ) -> Result<ToolkitCategoriesResponse, ComposioError>

List all toolkit categories

Retrieves a list of all available toolkit categories. Categories help organize toolkits by functionality or industry.

§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let categories = client.list_toolkit_categories().await?;
for category in categories.items {
    println!("Category: {}", category.name);
}
Source

pub async fn authorize_toolkit( &self, user_id: impl Into<String>, toolkit: impl Into<String>, ) -> Result<ConnectionRequest, ComposioError>

Authorize a user to a toolkit

Creates an authentication link for a user to connect to a specific toolkit. If an auth config is not found, it will be created using Composio managed auth.

This is a convenience method that:

  1. Gets or creates an auth config for the toolkit
  2. Initiates a connection for the user
  3. Returns the connection request with redirect URL
§Arguments
  • user_id - The ID of the user to authorize
  • toolkit - The slug of the toolkit to authorize (e.g., “github”, “gmail”)
§Returns

Returns a connection request with a redirect_url that the user should visit to complete the authentication flow.

§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let connection = client.authorize_toolkit("user_123", "github").await?;
println!("Visit this URL to authenticate: {}", connection.redirect_url.unwrap());
Source

pub async fn get_auth_config( &self, auth_config_id: impl Into<String>, ) -> Result<AuthConfigRetrieveResponse, ComposioError>

Retrieve an auth config by ID.

Source

pub async fn update_auth_config( &self, auth_config_id: impl Into<String>, params: AuthConfigUpdateParams, ) -> Result<AuthConfigUpdateResponse, ComposioError>

Update an auth config by ID.

Source

pub async fn delete_auth_config( &self, auth_config_id: impl Into<String>, ) -> Result<AuthConfigDeleteResponse, ComposioError>

Delete an auth config by ID.

Source

pub async fn update_auth_config_status( &self, auth_config_id: impl Into<String>, status: AuthConfigStatus, ) -> Result<AuthConfigStatusUpdateResponse, ComposioError>

Update auth config status to ENABLED or DISABLED.

Source

pub async fn get_connected_account_initiation_fields( &self, toolkit: impl Into<String>, auth_scheme: impl Into<String>, required_only: bool, ) -> Result<Vec<AuthField>, ComposioError>

Get connected account initiation fields for a toolkit

Retrieves the required and optional fields needed to initiate a connection for a specific toolkit and authentication scheme.

§Arguments
  • toolkit - The toolkit slug (e.g., “github”, “gmail”)
  • auth_scheme - The authentication scheme (e.g., “OAUTH2”, “API_KEY”)
  • required_only - If true, returns only required fields; if false, returns both required and optional
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let fields = client.get_connected_account_initiation_fields(
    "github",
    "OAUTH2",
    false
).await?;

for field in fields {
    println!("Field: {} (required: {})", field.name, field.required);
}
Source

pub async fn get_auth_config_creation_fields( &self, toolkit: impl Into<String>, auth_scheme: impl Into<String>, required_only: bool, ) -> Result<Vec<AuthField>, ComposioError>

Get auth config creation fields for a toolkit

Retrieves the required and optional fields needed to create an auth config for a specific toolkit and authentication scheme.

§Arguments
  • toolkit - The toolkit slug (e.g., “github”, “gmail”)
  • auth_scheme - The authentication scheme (e.g., “OAUTH2”, “API_KEY”)
  • required_only - If true, returns only required fields; if false, returns both required and optional
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let fields = client.get_auth_config_creation_fields(
    "github",
    "OAUTH2",
    true
).await?;

for field in fields {
    println!("Required field: {}", field.name);
}
Source

pub async fn list_tools( &self, params: ToolListParams, ) -> Result<ToolListResponse, ComposioError>

List tools with filtering options

Retrieves a list of available tools based on the provided filters. Tools are individual actions that can be performed on external services.

§Arguments
  • params - Filter parameters for the query
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::tools::ToolListParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = ToolListParams {
    toolkit_slug: Some("github".to_string()),
    limit: Some(20),
    ..Default::default()
};

let tools = client.list_tools(params).await?;
for tool in tools.items {
    println!("Tool: {} ({})", tool.name, tool.slug);
}
Source

pub async fn retrieve_tool_enum( &self, ) -> Result<ToolRetrieveEnumResponse, ComposioError>

Retrieve all tool slug enumeration values.

Source

pub async fn get_tool( &self, slug: impl Into<String>, ) -> Result<ToolInfo, ComposioError>

Get a specific tool by slug

Retrieves detailed information about a specific tool including input/output schemas, scopes, and version information.

§Arguments
  • slug - The tool slug (e.g., “GITHUB_CREATE_ISSUE”, “GMAIL_SEND_EMAIL”)
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let tool = client.get_tool("GITHUB_CREATE_ISSUE").await?;
println!("Tool: {}", tool.name);
println!("Description: {}", tool.description);
println!("Version: {}", tool.version);
Source

pub async fn execute_tool( &self, params: ToolExecuteParams, ) -> Result<ToolExecutionResponse, ComposioError>

Execute a tool

Executes a specific tool with the provided arguments. The tool must be available and the user must have appropriate authentication.

§Arguments
  • params - Tool execution parameters including slug, arguments, and auth info
§Returns

Returns a ToolExecutionResponse containing:

  • data: The tool’s output data
  • error: Optional error message if execution failed
  • successful: Whether the execution was successful
  • log_id: Unique identifier for this execution (for debugging)
§Errors

Returns an error if:

  • The tool is not found
  • The user doesn’t have a connected account for the toolkit
  • The arguments are invalid or missing required fields
  • Network error occurs
  • API returns an error response
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::tools::ToolExecuteParams;
use std::collections::HashMap;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let mut arguments = HashMap::new();
arguments.insert("owner".to_string(), serde_json::json!("composio"));
arguments.insert("repo".to_string(), serde_json::json!("composio"));
arguments.insert("title".to_string(), serde_json::json!("Test issue"));

let params = ToolExecuteParams {
    slug: "GITHUB_CREATE_ISSUE".to_string(),
    arguments,
    user_id: Some("user_123".to_string()),
    version: Some("1.0.0".to_string()),
    ..Default::default()
};

let result = client.execute_tool(params).await?;
println!("Result: {:?}", result.data);
Source

pub async fn proxy_tool( &self, params: ToolProxyParams, ) -> Result<ToolProxyResponse, ComposioError>

Execute a proxy request to a third-party API

Makes an authenticated HTTP request to a third-party API using a connected account’s credentials. This is useful for calling endpoints that don’t have predefined tools.

§Arguments
  • params - Proxy request parameters including endpoint, method, and auth
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::tools::{ToolProxyParams, HttpMethod};

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = ToolProxyParams {
    endpoint: "/repos/composio/composio".to_string(),
    method: HttpMethod::Get,
    connected_account_id: Some("ca_123".to_string()),
    body: None,
    parameters: None,
    custom_connection_data: None,
};

let result = client.proxy_tool(params).await?;
println!("Status: {}", result.status);
println!("Data: {:?}", result.data);
Source

pub async fn generate_tool_inputs( &self, params: ToolInputGenerationParams, ) -> Result<ToolInputGenerationResponse, ComposioError>

Generate tool inputs from natural language

Uses AI to convert a natural language description into structured tool arguments. This is useful for allowing users to describe what they want to do in plain language.

§Arguments
  • params - Input generation parameters including tool slug and text
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::tools::ToolInputGenerationParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = ToolInputGenerationParams {
    tool_slug: "GITHUB_CREATE_ISSUE".to_string(),
    text: "Create an issue about fixing the login bug in the composio repo".to_string(),
    custom_tool_description: None,
    custom_system_prompt: None,
};

let result = client.generate_tool_inputs(params).await?;
if let Some(arguments) = result.arguments {
    println!("Generated arguments: {:?}", arguments);
}
Source

pub async fn list_trigger_types( &self, params: TriggerTypeListParams, ) -> Result<TriggerTypeListResponse, ComposioError>

List trigger types

Retrieves a list of available trigger types (templates) based on filters. Trigger types define what events can be listened for.

§Arguments
  • params - Filter parameters for the query
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::triggers::TriggerTypeListParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = TriggerTypeListParams {
    toolkit_slugs: Some(vec!["github".to_string()]),
    limit: Some(20),
    ..Default::default()
};

let triggers = client.list_trigger_types(params).await?;
for trigger in triggers.items {
    println!("Trigger: {} ({})", trigger.name, trigger.slug);
}
Source

pub async fn retrieve_trigger_type_enum( &self, ) -> Result<TriggerTypeRetrieveEnumResponse, ComposioError>

Retrieve all trigger type slug enumeration values.

Source

pub async fn get_trigger_type( &self, slug: impl Into<String>, ) -> Result<TriggerType, ComposioError>

Get a specific trigger type by slug

Retrieves detailed information about a trigger type including configuration schema and payload schema.

§Arguments
  • slug - The trigger type slug (e.g., “GITHUB_COMMIT_EVENT”)
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let trigger = client.get_trigger_type("GITHUB_COMMIT_EVENT").await?;
println!("Trigger: {}", trigger.name);
println!("Type: {}", trigger.trigger_type);
println!("Config schema: {}", trigger.config);
Source

pub async fn get_trigger_type_with_params( &self, slug: impl Into<String>, params: TriggerTypeRetrieveParams, ) -> Result<TriggerType, ComposioError>

Get a specific trigger type by slug with optional query parameters.

Source

pub async fn list_active_triggers( &self, params: TriggerInstanceListParams, ) -> Result<TriggerInstanceListResponse, ComposioError>

List active trigger instances

Retrieves a list of active trigger instances (listeners) based on filters. Trigger instances are active event listeners for specific users.

§Arguments
  • params - Filter parameters for the query
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::triggers::TriggerInstanceListParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let params = TriggerInstanceListParams {
    trigger_names: Some(vec!["GITHUB_COMMIT_EVENT".to_string()]),
    show_disabled: Some(false),
    ..Default::default()
};

let instances = client.list_active_triggers(params).await?;
for instance in instances.items {
    println!("Instance: {} for user {}", instance.trigger_name, instance.user_id.unwrap_or_default());
}
Source

pub async fn create_trigger( &self, params: TriggerCreateParams, ) -> Result<TriggerCreateResponse, ComposioError>

Create a trigger instance

Creates a new trigger instance (event listener) for a user. Either connected_account_id or user_id must be provided. If user_id is provided, the most recent connected account will be used.

§Arguments
  • params - Trigger creation parameters
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::triggers::TriggerCreateParams;
use std::collections::HashMap;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

let mut config = HashMap::new();
config.insert("repo".to_string(), serde_json::json!("composio"));
config.insert("owner".to_string(), serde_json::json!("composio"));

let params = TriggerCreateParams {
    slug: "GITHUB_COMMIT_EVENT".to_string(),
    user_id: Some("user_123".to_string()),
    connected_account_id: None,
    trigger_config: Some(config),
    toolkit_versions: None,
};

let trigger = client.create_trigger(params).await?;
println!("Created trigger: {}", trigger.id);
Source

pub async fn delete_trigger( &self, trigger_id: impl Into<String>, ) -> Result<(), ComposioError>

Delete a trigger instance

Permanently deletes a trigger instance. This cannot be undone.

§Arguments
  • trigger_id - The trigger instance ID to delete
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

client.delete_trigger("ti_abc123").await?;
println!("Trigger deleted");
Source

pub async fn enable_trigger( &self, trigger_id: impl Into<String>, ) -> Result<(), ComposioError>

Enable a trigger instance

Enables a previously disabled trigger instance.

§Arguments
  • trigger_id - The trigger instance ID to enable
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

client.enable_trigger("ti_abc123").await?;
println!("Trigger enabled");
Source

pub async fn disable_trigger( &self, trigger_id: impl Into<String>, ) -> Result<(), ComposioError>

Disable a trigger instance

Temporarily disables a trigger instance without deleting it.

§Arguments
  • trigger_id - The trigger instance ID to disable
§Example
use composio_sdk::client::ComposioClient;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

client.disable_trigger("ti_abc123").await?;
println!("Trigger disabled");
Source

pub fn verify_webhook( &self, params: WebhookVerifyParams, ) -> Result<VerifyWebhookResult, ComposioError>

Verify an incoming webhook payload and signature

This method validates that the webhook request is authentic by:

  1. Validating the webhook timestamp is within the tolerance window
  2. Verifying the HMAC-SHA256 signature using the correct algorithm
  3. Parsing the payload and detecting the webhook version (V1, V2, or V3)
§Arguments
  • params - Webhook verification parameters including id, payload, signature, timestamp, and secret
§Returns

Returns a VerifyWebhookResult containing:

  • version: Detected webhook version (V1, V2, or V3)
  • payload: Normalized trigger event
  • raw_payload: Original parsed payload
§Errors

Returns an error if:

  • Signature verification fails
  • Timestamp is outside tolerance window
  • Payload cannot be parsed
  • Required headers are missing
§Example
use composio_sdk::client::ComposioClient;
use composio_sdk::models::triggers::WebhookVerifyParams;

let client = ComposioClient::builder()
    .api_key("your_api_key")
    .build()?;

// In a webhook handler (e.g., Actix-web, Axum, etc.)
let params = WebhookVerifyParams {
    id: "msg_abc123".to_string(),
    payload: r#"{"type":"composio.trigger.message","data":{}}"#.to_string(),
    signature: "v1,base64signature".to_string(),
    timestamp: "1234567890".to_string(),
    secret: "whsec_abc123".to_string(),
    tolerance: Some(300),
};

let result = client.verify_webhook(params)?;
println!("Webhook version: {:?}", result.version);
println!("Trigger slug: {}", result.payload.trigger_slug);

Trait Implementations§

Source§

impl Clone for ComposioClient

Source§

fn clone(&self) -> ComposioClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ComposioClient

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> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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