Trait cvar::IVisit [] [src]

pub trait IVisit {
    fn visit(&self, f: &mut FnMut(Node));
}

Visitor Pattern interface.

Required Methods

Calls the callback f with every child casted as Node.

use ::std::cell::Cell;
struct Object {
    foo: Cell<i32>,
    bar: Cell<i32>,
}
impl cvar::IVisit for Object {
    fn visit(&self, f: &mut FnMut(cvar::Node)) {
        use cvar::{Property};
        f(From::from(&Property::new("foo", "foo description", &self.foo, 42)));
        f(From::from(&Property::new("bar", "bar description", &self.bar, 12)));
    }
}

Trait Implementations

impl<'a> Debug for &'a IVisit
[src]

Formats the value using the given formatter.

Implementors