pub struct VComponent {
pub name: &'static str,
/* private fields */
}
Expand description
An instance of a child component
Fields§
§name: &'static str
The name of this component
Implementations§
Source§impl VComponent
impl VComponent
Sourcepub fn new<P, M: 'static>(
component: impl ComponentFunction<P, M>,
props: P,
fn_name: &'static str,
) -> Selfwhere
P: Properties + 'static,
pub fn new<P, M: 'static>(
component: impl ComponentFunction<P, M>,
props: P,
fn_name: &'static str,
) -> Selfwhere
P: Properties + 'static,
Create a new VComponent
variant
Sourcepub fn mounted_scope_id(
&self,
dynamic_node_index: usize,
vnode: &VNode,
dom: &VirtualDom,
) -> Option<ScopeId>
pub fn mounted_scope_id( &self, dynamic_node_index: usize, vnode: &VNode, dom: &VirtualDom, ) -> Option<ScopeId>
Sourcepub fn mounted_scope<'a>(
&self,
dynamic_node_index: usize,
vnode: &VNode,
dom: &'a VirtualDom,
) -> Option<&'a ScopeState>
pub fn mounted_scope<'a>( &self, dynamic_node_index: usize, vnode: &VNode, dom: &'a VirtualDom, ) -> Option<&'a ScopeState>
Get the scope this node is mounted to if it’s mounted
This is useful for rendering nodes outside of the VirtualDom, such as in SSR
Returns None
if the node is not mounted
Trait Implementations§
Source§impl Clone for VComponent
impl Clone for VComponent
Auto Trait Implementations§
impl Freeze for VComponent
impl !RefUnwindSafe for VComponent
impl !Send for VComponent
impl !Sync for VComponent
impl Unpin for VComponent
impl !UnwindSafe for VComponent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.