pub struct Slots(/* private fields */);Expand description
Parallel-route slots passed to a layout (@analytics → slots.take("analytics")).
Implementations§
Source§impl Slots
impl Slots
pub fn new() -> Slots
pub fn insert(&mut self, name: impl Into<String>, node: impl View)
Sourcepub fn take(&mut self, name: &str) -> Node
pub fn take(&mut self, name: &str) -> Node
Take a slot’s content (empty if the slot has nothing to render).
pub fn contains(&self, name: &str) -> bool
pub fn names(&self) -> impl Iterator<Item = &str>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Slots
impl !Sync for Slots
impl !UnwindSafe for Slots
impl Forget for Slots
impl Freeze for Slots
impl Move for Slots
impl Send for Slots
impl Unpin for Slots
impl UnsafeUnpin for Slots
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