pub fn extract_u32(value: u32, start: u32, length: u32) -> Option<u32> {
    if length > 32 - start {
        error!(
            "extract_u32: ( start {} length {} ) is out of range",
            start, length
        );
        return None;
    }

    Some((value >> start) & (!0_u32 >> (32 - length)))
}
///  Extract from the 32 bit input @value the bit field specified by the
///  @start and @length parameters, and return it. The bit field must
///  lie entirely within the 32 bit word. It is valid to request that
///  all 32 bits are returned (ie @length 32 and @start 0).
///
/// # Arguments
///
/// * `value` - The value to extract the bit field from
/// * `start` - The lowest bit in the bit field (numbered from 0)
/// * `length` - The length of the bit field
///
/// # Examples
///
/// ```rust
/// extern crate util;
/// use util::num_ops::extract_u32;
///
/// let value = extract_u32(0xfffa, 0, 8).unwrap();
/// assert!(value == 0xfa);
/// ```
Extract from the 32 bit input @value the bit field specified by the
@start and @length parameters, and return it. The bit field must
lie entirely within the 32 bit word. It is valid to request that
all 32 bits are returned .
Extract from the 32 bit input @value the bit field specified by the @start and @length parameters and return it . The bit field must lie entirely within the 32 bit word . It is valid to request that all 32 bits are returned .
pub fn extract_u32(value: u32, start: u32, length: u32) -> Option<u32> {
    if length > 32 - start {
        error!(
            "extract_u32: ( start {} length {} ) is out of range",
            start, length
        );
        return None;
    }
    Some((value >> start) & (!0_u32 >> (32 - length)))
}
pub fn extract_u32 ( value : u32 , start : u32 , length : u32 ) -> Option < u32 > { if length > 32 - start { error ! ( " " start length ) ; return None ; } Some ( ( value >> start ) & ( ! 0_u32 >> ( 32 - length ) ) ) }
Extract from the 32 bit input @value the bit field specified by the
@start and @length parameters, and return it.
Extract from the 32 bit input @value the bit field specified by the @start and @length parameters and return it .
value
u32
start
u32
length
u32
value
u32
start
u32
length
u32
examples
```rust
extern crate util;
use util::num_ops::extract_u32.


` ` ` rust extern crate util ; use util :: num_ops :: extract_u32 .