Type Alias Result

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

A specialized Result type for genetic algorithm operations.

This type is a convenience wrapper around std::result::Result with the error type fixed to GeneticError.

§Examples

use genalg::error::{GeneticError, Result};

fn may_fail() -> Result<i32> {
    // Some operation that might fail
    Ok(42)
}

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(GeneticError)

Contains the error value