pub struct Absent<T>(/* private fields */);Expand description
A list variable that was never given a value.
Empty would do, but a list has to name its item type or nothing can infer it, so this is
Empty with the item type written down. Generated code uses it; you should never need to name
it.
Absent is not the same as empty, and {{ rows.length }} is the one place the difference shows:
a list that was never set counts as nothing, where a list with no items in it counts 0. That
is what handlebars.js does with an undefined value against an empty array.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Absent<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for Absent<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for Absent<T>where
PhantomData<T>: Send,
impl<T> Sync for Absent<T>where
PhantomData<T>: Sync,
impl<T> Unpin for Absent<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for Absent<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for Absent<T>where
PhantomData<T>: UnwindSafe,
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