Skip to main content

try_from

Macro try_from 

Source
macro_rules! try_from {
    () => { ... };
    ($ex:expr, $t:ty) => { ... };
    ($($ex:tt)*, $t:ty) => { ... };
}
Expand description

A try_from convenience wrapper for AstNode, passed as the ex:expr argument. Will try to return a reference to the variants inner type, specified via the t:ty parameter. Converts the try_from-Result into an Option