Struct leptos_dom::Fragment
source · pub struct Fragment {
pub nodes: Vec<View>,
/* private fields */
}
Expand description
Represents a group of views
.
Fields§
§nodes: Vec<View>
The nodes contained in the fragment.
Implementations§
source§impl Fragment
impl Fragment
sourcepub const fn new_with_id(id: Option<HydrationKey>, nodes: Vec<View>) -> Self
pub const fn new_with_id(id: Option<HydrationKey>, nodes: Vec<View>) -> Self
sourcepub fn as_children(&self) -> &[View]
pub fn as_children(&self) -> &[View]
Gives access to the View
children contained within the fragment.
sourcepub fn id(&self) -> &Option<HydrationKey>
pub fn id(&self) -> &Option<HydrationKey>
Returns the fragment’s hydration ID.
sourcepub fn with_view_marker(self, marker: impl Into<String>) -> Self
pub fn with_view_marker(self, marker: impl Into<String>) -> Self
Adds an optional marker indicating the view macro source.
Trait Implementations§
source§impl FromIterator<View> for Fragment
impl FromIterator<View> for Fragment
Auto Trait Implementations§
impl Freeze for Fragment
impl !RefUnwindSafe for Fragment
impl !Send for Fragment
impl !Sync for Fragment
impl Unpin for Fragment
impl !UnwindSafe for Fragment
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