pub struct MockRouter {
pub router: BTreeMap<ModuleId, Arc<dyn Module>>,
pub port_to_module: BTreeMap<PortId, ModuleId>,
}Fields§
§router: BTreeMap<ModuleId, Arc<dyn Module>>§port_to_module: BTreeMap<PortId, ModuleId>Maps ports to the module that owns it
Implementations§
Trait Implementations§
Source§impl Debug for MockRouter
impl Debug for MockRouter
Source§impl Default for MockRouter
impl Default for MockRouter
Source§fn default() -> MockRouter
fn default() -> MockRouter
Returns the “default value” for a type. Read more
Source§impl Router for MockRouter
impl Router for MockRouter
Source§fn get_route(&self, module_id: &ModuleId) -> Option<&dyn Module>
fn get_route(&self, module_id: &ModuleId) -> Option<&dyn Module>
Returns a reference to a
Module registered against the specified ModuleIdAuto Trait Implementations§
impl Freeze for MockRouter
impl !RefUnwindSafe for MockRouter
impl !Send for MockRouter
impl !Sync for MockRouter
impl Unpin for MockRouter
impl !UnwindSafe for MockRouter
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request