Struct maomi::node::ControlNode
source · pub struct ControlNode<C> {
pub forest_token: ForestToken,
pub content: C,
}
Expand description
A helper type for control flow node such as “if” node and “for” node.
Fields§
§forest_token: ForestToken
The backend node token
It is auto-managed by the #[component]
.
Do not touch unless you know how it works exactly.
content: C
The content nodes of the control node.
Implementations§
source§impl<C> ControlNode<C>
impl<C> ControlNode<C>
sourcepub fn new(forest_token: ForestToken, content: C) -> Self
pub fn new(forest_token: ForestToken, content: C) -> Self
Create a control node.
Trait Implementations§
Auto Trait Implementations§
impl<C> RefUnwindSafe for ControlNode<C>where C: RefUnwindSafe,
impl<C> !Send for ControlNode<C>
impl<C> !Sync for ControlNode<C>
impl<C> Unpin for ControlNode<C>where C: Unpin,
impl<C> UnwindSafe for ControlNode<C>where C: UnwindSafe,
Blanket Implementations§
source§impl<S, T> PropAsRef<S> for Twhere
S: PartialEq<S> + ToOwned<Owned = T> + ?Sized,
T: Borrow<S>,
impl<S, T> PropAsRef<S> for Twhere S: PartialEq<S> + ToOwned<Owned = T> + ?Sized, T: Borrow<S>,
source§fn property_as_ref(&self) -> &S
fn property_as_ref(&self) -> &S
Borrow
&Self
as &S
.source§fn property_to_owned(s: &S) -> T
fn property_to_owned(s: &S) -> T
Clone
&S
as a new Self
.