Skip to main content

try_from_mut

Macro try_from_mut 

Source
macro_rules! try_from_mut {
    () => { ... };
    ($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