pub struct If;
Expand description
Evaluates an argument as truthy.
For block execution if the value is truthy the inner template is rendered otherwise each conditional is evaluated and the first one which returns a truthy value is rendered.
When executed in a statement this helper returns whether it’s argument is truthy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for If
impl RefUnwindSafe for If
impl Send for If
impl Sync for If
impl Unpin for If
impl UnwindSafe for If
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more