#[repr(C)]pub struct SourceManager { /* private fields */ }
Expand description
The SourceManager
is responsible for managing the current data sources
Implementations§
Source§impl SourceManager
impl SourceManager
Sourcepub const fn new() -> Self
pub const fn new() -> Self
create a new instance of the SourceManager
.
Sourcepub fn from_registry(registry: SourceRegistry) -> Self
pub fn from_registry(registry: SourceRegistry) -> Self
create a new SourceManager
with the provided SourceRegistry
and the default
PipeRouter
.
Sourcepub fn from_router(router: PipeRouter) -> Self
pub fn from_router(router: PipeRouter) -> Self
create a new SourceManager
with the provided PipeRouter
and the default
SourceRegistry
.
Sourcepub const fn registry(&self) -> &SourceRegistry
pub const fn registry(&self) -> &SourceRegistry
returns an immutable reference to the current SourceRegistry
.
Sourcepub const fn registry_mut(&mut self) -> &mut SourceRegistry
pub const fn registry_mut(&mut self) -> &mut SourceRegistry
returns a mutable reference to the current SourceRegistry
.
Sourcepub const fn router(&self) -> &PipeRouter
pub const fn router(&self) -> &PipeRouter
returns a reference to the PipeRouter
used by this SourceManager
.
Sourcepub fn router_mut(&mut self) -> &mut PipeRouter
pub fn router_mut(&mut self) -> &mut PipeRouter
returns a mutable reference to the PipeRouter
used by this SourceManager
.
Sourcepub fn set_registry(&mut self, registry: SourceRegistry) -> &mut Self
pub fn set_registry(&mut self, registry: SourceRegistry) -> &mut Self
overwrite the current SourceRegistry
with the provided one and return a mutable
reference to self
Sourcepub const fn with_registry(self, registry: SourceRegistry) -> Self
pub const fn with_registry(self, registry: SourceRegistry) -> Self
consumes the current instance to create another with the given registry.
Sourcepub const fn with_router(self, router: PipeRouter) -> Self
pub const fn with_router(self, router: PipeRouter) -> Self
consumes the current instance to create another with the given PipeRouter
.
Trait Implementations§
Source§impl Clone for SourceManager
impl Clone for SourceManager
Source§fn clone(&self) -> SourceManager
fn clone(&self) -> SourceManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more