var searchIndex = {}; searchIndex["enum_primitive"] = {"doc":"This crate exports a macro `enum_from_primitive!` that wraps an\n`enum` declaration and automatically adds an implementation of\n`num::FromPrimitive` (reexported here), to allow conversion from\nprimitive integers to the enum. It therefore provides an\nalternative to the built-in `#[derive(FromPrimitive)]`, which\nrequires the unstable `std::num::FromPrimitive` and is disabled in\nRust 1.0.","items":[[4,"Option","enum_primitive","The `Option` type. See [the module level documentation](index.html) for more.",null,null],[13,"None","","No value",0,null],[13,"Some","","Some value `T`",0,null],[8,"FromPrimitive","","A generic trait for converting a number to a value.",null,null],[11,"from_isize","","Convert an `isize` to return an optional value of this type. If the\nvalue cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"isize"}],"output":{"name":"option"}}],[11,"from_i8","","Convert an `i8` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"i8"}],"output":{"name":"option"}}],[11,"from_i16","","Convert an `i16` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"i16"}],"output":{"name":"option"}}],[11,"from_i32","","Convert an `i32` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"i32"}],"output":{"name":"option"}}],[10,"from_i64","","Convert an `i64` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"i64"}],"output":{"name":"option"}}],[11,"from_usize","","Convert a `usize` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"usize"}],"output":{"name":"option"}}],[11,"from_u8","","Convert an `u8` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[11,"from_u16","","Convert an `u16` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"u16"}],"output":{"name":"option"}}],[11,"from_u32","","Convert an `u32` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"u32"}],"output":{"name":"option"}}],[10,"from_u64","","Convert an `u64` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"u64"}],"output":{"name":"option"}}],[11,"from_f32","","Convert a `f32` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"f32"}],"output":{"name":"option"}}],[11,"from_f64","","Convert a `f64` to return an optional value of this type. If the\ntype cannot be represented by this value, the `None` is returned.",1,{"inputs":[{"name":"f64"}],"output":{"name":"option"}}],[14,"enum_from_primitive_impl_ty!","","Helper macro for internal use by `enum_from_primitive!`.",null,null],[14,"enum_from_primitive_impl!","","Helper macro for internal use by `enum_from_primitive!`.",null,null],[14,"enum_from_primitive!","","Wrap this macro around an `enum` declaration to get an\nautomatically generated implementation of `num::FromPrimitive`.",null,null],[11,"is_some","","Returns `true` if the option is a `Some` value",0,null],[11,"is_none","","Returns `true` if the option is a `None` value",0,null],[11,"as_ref","","Converts from `Option<T>` to `Option<&T>`",0,null],[11,"as_mut","","Converts from `Option<T>` to `Option<&mut T>`",0,null],[11,"expect","","Unwraps an option, yielding the content of a `Some`.",0,null],[11,"unwrap","","Moves the value `v` out of the `Option<T>` if it is `Some(v)`.",0,null],[11,"unwrap_or","","Returns the contained value or a default.",0,null],[11,"unwrap_or_else","","Returns the contained value or computes it from a closure.",0,null],[11,"map","","Maps an `Option<T>` to `Option<U>` by applying a function to a contained value",0,null],[11,"map_or","","Applies a function to the contained value (if any),\nor returns a `default` (if not).",0,null],[11,"map_or_else","","Applies a function to the contained value (if any),\nor computes a `default` (if not).",0,null],[11,"ok_or","","Transforms the `Option<T>` into a `Result<T, E>`, mapping `Some(v)` to\n`Ok(v)` and `None` to `Err(err)`.",0,null],[11,"ok_or_else","","Transforms the `Option<T>` into a `Result<T, E>`, mapping `Some(v)` to\n`Ok(v)` and `None` to `Err(err())`.",0,null],[11,"iter","","Returns an iterator over the possibly contained value.",0,null],[11,"iter_mut","","Returns a mutable iterator over the possibly contained value.",0,null],[11,"and","","Returns `None` if the option is `None`, otherwise returns `optb`.",0,null],[11,"and_then","","Returns `None` if the option is `None`, otherwise calls `f` with the\nwrapped value and returns the result.",0,null],[11,"or","","Returns the option if it contains a value, otherwise returns `optb`.",0,null],[11,"or_else","","Returns the option if it contains a value, otherwise calls `f` and\nreturns the result.",0,null],[11,"take","","Takes the value out of the option, leaving a `None` in its place.",0,null],[11,"cloned","","Maps an `Option<&T>` to an `Option<T>` by cloning the contents of the\noption.",0,null],[11,"unwrap_or_default","","Returns the contained value or a default",0,null],[11,"hash","","",0,null],[11,"fmt","","",0,null],[11,"cmp","","",0,null],[11,"partial_cmp","","",0,null],[11,"lt","","",0,null],[11,"le","","",0,null],[11,"gt","","",0,null],[11,"ge","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"default","","",0,{"inputs":[],"output":{"name":"option"}}],[11,"into_iter","","Returns a consuming iterator over the possibly contained value.",0,null],[11,"from","","",0,{"inputs":[{"name":"t"}],"output":{"name":"option"}}],[11,"from_iter","","Takes each element in the `Iterator`: if it is `None`, no further\nelements are taken, and the `None` is returned. Should no `None` occur, a\ncontainer with the values of each `Option` is returned.",0,{"inputs":[{"name":"i"}],"output":{"name":"option"}}]],"paths":[[4,"Option"],[8,"FromPrimitive"]]}; initSearch(searchIndex);