Struct intuitive::components::Embed
source · pub struct Embed {
pub content: Content,
}
Expand description
A component that renders an element::Any
or a component::Any
.
This is often needed when rendering children. More generally, Embed
is
useful when you have a variable that contains an element::Any
or
a component::Any
and you want to insert it into a render!
call.
For example,
#[component(Centered)]
pub fn render(children: Children<1>) {
render! {
VStack() {
Empty()
HStack() {
Empty()
Embed(content: children[0].clone())
Empty()
}
Empty()
}
}
}
Fields§
§content: Content
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Embed
impl Send for Embed
impl Sync for Embed
impl Unpin for Embed
impl !UnwindSafe for Embed
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