[][src]Macro rdp::cast

macro_rules! cast {
    ($ident:path, $expr:expr) => { ... };
}

Retrieve leaf value into a type tree

This is a facilitate macro use to visit a type tree and check and retrieve the inner value

Example

    let message = component!(
        "header" => U32::LE(1234)
    );
    let header = cast!(DataType::U32, message["header"]).unwrap();
    assert_eq!(header, 1234)