Skip to main content

Result

Type Alias Result 

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

Standard Result type for x0x identity operations.

All async and sync identity functions return Result<T> which is an alias for std::result::Result<T, IdentityError>.

§Examples

use x0x::identity::MachineKeypair;
use x0x::error::Result;

fn create_identity() -> Result<MachineKeypair> {
    MachineKeypair::generate()
}

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(IdentityError)

Contains the error value