Result

Type Alias Result 

Source
pub type Result<T> = Result<T, Error>;
Expand description

Type alias for Result<T, Error> used throughout the SDK.

This makes function signatures more concise and ensures consistent error handling across the entire API surface. Instead of writing std::result::Result<T, Error>, you can simply write Result<T>.

§Example

use open_agent::Result;

async fn send_request() -> Result<String> {
    // Function body
    Ok("Success".to_string())
}

Aliased Type§

pub enum Result<T> {
    Ok(T),
    Err(Error),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value