Trait cpp_demangle::ast::DemangleWithInner [] [src]

pub trait DemangleWithInner {
    fn demangle_with_inner<D: ?Sized, W>(&self,
                                         inner: Option<&D>,
                                         ctx: &mut DemangleContext<W>,
                                         stack: Option<ArgStack>)
                                         -> Result<()> where D: Demangle, W: Write; }

Sometimes an AST node needs to insert itself as an inner item within one of its children when demangling that child. For example, the AST (array 10 int) is demangled as int[10], but if we were to demangle (lvalue-ref (array 10 int)) then we want this demangled form: int (&) [10]. The DemangleWithInner trait enables such behavior by allowing us to pass AST parents down to their children as inner items.

The inner item is an Option so we can provide a default Demangle implementation for all DemangleWithInner implementors, and don't have to write two copies of almost-but-not-quite the same code.

Required Methods

Demangle this type with the given inner item.

Implementors