Macro kdb::cast[][src]

macro_rules! cast {
    ($ex:expr; $t:ty) => { ... };
}

Cast a KBox, &KBox or &Any to another KDB type.

If the KDB type is anything other than the expected one, the cast will panic.

Example

let a: KBox<Any> = symbol("Hello").into();
assert_eq!(symbol("Hello"), cast!(a; Atom<Symbol>).value());