[][src]Function atomic_hooks::do_once

pub fn do_once<F: FnMut()>(func: F) -> StateAccess<bool>

call the provided function once and once only returns a unmmunt which will allow the do_once to repeat if .execute_if_activated() is called on the unmount. Example

do_once(||{ println!("This will print only once"); });