pub struct ModuleEntity {
pub module_work: Arc<dyn ModuleTrait>,
pub download_middleware: Vec<Arc<dyn ModuleTrait>>,
pub data_middleware: Vec<DataMiddlewareHandle>,
pub store_middleware: Vec<DataStoreMiddlewareHandle>,
}Expand description
Assembly helper for creating Module runtime instances.
Fields§
§module_work: Arc<dyn ModuleTrait>§download_middleware: Vec<Arc<dyn ModuleTrait>>§data_middleware: Vec<DataMiddlewareHandle>§store_middleware: Vec<DataStoreMiddlewareHandle>Implementations§
Source§impl ModuleEntity
impl ModuleEntity
Sourcepub fn add_download_middleware(self, middleware: Arc<dyn ModuleTrait>) -> Self
pub fn add_download_middleware(self, middleware: Arc<dyn ModuleTrait>) -> Self
Adds a download middleware module.
Sourcepub fn add_data_middleware(self, middleware: DataMiddlewareHandle) -> Self
pub fn add_data_middleware(self, middleware: DataMiddlewareHandle) -> Self
Adds a data middleware implementation.
Sourcepub fn add_store_middleware(self, middleware: DataStoreMiddlewareHandle) -> Self
pub fn add_store_middleware(self, middleware: DataStoreMiddlewareHandle) -> Self
Adds a data store middleware implementation.
Trait Implementations§
Source§impl From<Arc<dyn ModuleTrait>> for ModuleEntity
impl From<Arc<dyn ModuleTrait>> for ModuleEntity
Source§fn from(module: Arc<dyn ModuleTrait>) -> Self
fn from(module: Arc<dyn ModuleTrait>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleEntity
impl !UnwindSafe for ModuleEntity
impl Freeze for ModuleEntity
impl Send for ModuleEntity
impl Sync for ModuleEntity
impl Unpin for ModuleEntity
impl UnsafeUnpin for ModuleEntity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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