pub struct VComponent { /* private fields */ }Expand description
Special VNode type, which represents custom component node. There is no direct translation of VComponent to a single DOM node, but it translates to a subtree of DOM nodes.
Implementations§
Source§impl VComponent
impl VComponent
Sourcepub fn new<C>(props: C::Properties, key: Option<String>) -> VComponentwhere
C: Component + 'static,
pub fn new<C>(props: C::Properties, key: Option<String>) -> VComponentwhere
C: Component + 'static,
Creates VComponent out of provided properties. Function is generic, therefore type of Component C has to be specified.
§Examples
struct ExampleComponent;
impl Component for ExampleComponent {
type Properties = ();
...
}
let props = ();
let vcomp = VComponent::new::<ExampleComponent>(props, None);Trait Implementations§
Source§impl Debug for VComponent
impl Debug for VComponent
Source§impl From<VComponent> for VNode
impl From<VComponent> for VNode
Source§fn from(vcomp: VComponent) -> Self
fn from(vcomp: VComponent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VComponent
impl PartialEq 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more