pub struct MountEntry {
pub class: &'static str,
pub mount: fn(MountProps) -> Box<dyn Any + Send>,
}Expand description
Mount factory entry. Submitted by #[spark_actions] when a #[spark_mount]
method is present, otherwise the component falls back to Default::default().
The factory returns a type-erased boxed instance of the concrete component
type — the caller (the component’s generated default_then_props) downcasts
back to Self using Box::downcast::<Self>(). This keeps the entry type
non-generic so inventory::collect! works.
Fields§
§class: &'static str§mount: fn(MountProps) -> Box<dyn Any + Send>Trait Implementations§
impl Collect for MountEntry
Auto Trait Implementations§
impl Freeze for MountEntry
impl RefUnwindSafe for MountEntry
impl Send for MountEntry
impl Sync for MountEntry
impl Unpin for MountEntry
impl UnsafeUnpin for MountEntry
impl UnwindSafe for MountEntry
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> 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<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