fn option_match() {
    let value: Option<int> = Some(10);

    // This is the most common
    // way to use Optional values.
    match value {
        // Using `_` as variable name since it's not being used,
        // this silents 'unused variable' warnings from the compiler
        Some(_) => println("It is indeed an int and has a value"),
        None => println("It'll never get here")
    }
}
/**
 *
 * Options represent optional values that can be either Some(T) or None
 *
 * Optional values are very useful when working with non-deterministic
 * environments, concurrent environments, signals / events, etc.
 *
 * A common way to unwrap `Option` values is to use match and checking
 * whether it holds a value or not. Although this is widely used, `Option`
 * also implements a big set of useful methods that cover most of the cases:
 *
 *  - unwrap: Returns the value or fails if it's None.
 *
 *  - unwrap_or: This returns the held value if any or the value passed to
 *  this call.
 *
 *  - is_(none|some): Return a boolean saying whether it holds a value or None.
 *
 */
Options represent optional values that can be either Some(T) or None
Optional values are very useful when working with non-deterministic
environments, concurrent environments, signals / events, etc.

A common way to unwrap `Option` values is to use match and checking
whether it holds a value or not. Although this is widely used, `Option`
also implements a big set of useful methods that cover most of the cases.

- unwrap: Returns the value or fails if it's None.

- unwrap_or: This returns the held value if any or the value passed to
this call.

- is_(none|some): Return a boolean saying whether it holds a value or None.
Options represent optional values that can be either Some ( T ) or None Optional values are very useful when working with non - deterministic environments concurrent environments signals / events etc . A common way to unwrap ` Option ` values is to use match and checking whether it holds a value or not . Although this is widely used ` Option ` also implements a big set of useful methods that cover most of the cases . - unwrap : Returns the value or fails if it ' s None . - unwrap_or : This returns the held value if any or the value passed to this call . - is_ ( none|some ) : Return a boolean saying whether it holds a value or None .
fn option_match() {
    let value: Option<int> = Some(10);
    // This is the most common
    // way to use Optional values.
    match value {
        // Using `_` as variable name since it's not being used,
        // this silents 'unused variable' warnings from the compiler
        Some(_) => println("It is indeed an int and has a value"),
        None => println("It'll never get here")
    }
}
fn option_match ( ) { let value : Option < int > = Some ( 10 ) ; // This is the most common // way to use Optional values. match value { // Using `_` as variable name since it's not being used, // this silents 'unused variable' warnings from the compiler Some ( _ ) => println ( " " ) , None => println ( " " ) } }
Options represent optional values that can be either Some(T) or None
 Optional values are very useful when working with non-deterministic
 environments, concurrent environments, signals / events, etc.
Options represent optional values that can be either Some ( T ) or None Optional values are very useful when working with non - deterministic environments concurrent environments signals / events etc .