Struct cvar::Visit [−][src]
Node visitor from closure.
The visitor trait IVisit
requires a struct type to be implemented.
This wrapper type allows a visitor to be created out of a closure instead.
let mut value = 0; let mut visitor = cvar::Visit(|f| { f(&mut cvar::Property("value", &mut value, 0)); }); let _ = cvar::console::set(&mut visitor, "value", "42"); assert_eq!(value, 42);
Trait Implementations
impl<F: Clone + FnMut(&mut dyn FnMut(&mut dyn INode))> Clone for Visit<F>
[src]
impl<F: Copy + FnMut(&mut dyn FnMut(&mut dyn INode))> Copy for Visit<F>
[src]
impl<F: Debug + FnMut(&mut dyn FnMut(&mut dyn INode))> Debug for Visit<F>
[src]
impl<F: FnMut(&mut dyn FnMut(&mut dyn INode))> IVisit for Visit<F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for Visit<F> where
F: RefUnwindSafe,
[src]
F: RefUnwindSafe,
impl<F> Send for Visit<F> where
F: Send,
[src]
F: Send,
impl<F> Sync for Visit<F> where
F: Sync,
[src]
F: Sync,
impl<F> Unpin for Visit<F> where
F: Unpin,
[src]
F: Unpin,
impl<F> UnwindSafe for Visit<F> where
F: UnwindSafe,
[src]
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,