pub struct MockDdsInterface { /* private fields */ }Expand description
Mock DDS interface for testing without real HDDS
Implementations§
Source§impl MockDdsInterface
impl MockDdsInterface
Sourcepub fn add_reader(&self, reader: DiscoveredReader)
pub fn add_reader(&self, reader: DiscoveredReader)
Add a mock discovered reader
Sourcepub fn add_writer(&self, writer: DiscoveredWriter)
pub fn add_writer(&self, writer: DiscoveredWriter)
Add a mock discovered writer
Sourcepub fn add_sample(&self, sample: ReceivedSample)
pub fn add_sample(&self, sample: ReceivedSample)
Add a mock sample to be returned by readers
Trait Implementations§
Source§impl DdsInterface for MockDdsInterface
impl DdsInterface for MockDdsInterface
Source§fn create_reader(
&self,
topic: &str,
type_name: &str,
_durability: DurabilityKind,
) -> Result<Box<dyn DataReader>>
fn create_reader( &self, topic: &str, type_name: &str, _durability: DurabilityKind, ) -> Result<Box<dyn DataReader>>
Create a data reader for a topic Read more
Source§fn create_writer(
&self,
topic: &str,
type_name: &str,
_durability: DurabilityKind,
) -> Result<Box<dyn DataWriter>>
fn create_writer( &self, topic: &str, type_name: &str, _durability: DurabilityKind, ) -> Result<Box<dyn DataWriter>>
Create a data writer for a topic Read more
Source§fn discovered_readers(
&self,
topic_pattern: &str,
) -> Result<Vec<DiscoveredReader>>
fn discovered_readers( &self, topic_pattern: &str, ) -> Result<Vec<DiscoveredReader>>
Get list of discovered readers matching a topic pattern
Source§fn discovered_writers(
&self,
topic_pattern: &str,
) -> Result<Vec<DiscoveredWriter>>
fn discovered_writers( &self, topic_pattern: &str, ) -> Result<Vec<DiscoveredWriter>>
Get list of discovered writers matching a topic pattern
Source§fn wait_for_discovery(&self, _timeout: Duration) -> Result<bool>
fn wait_for_discovery(&self, _timeout: Duration) -> Result<bool>
Wait for discovery events Read more
Source§fn register_discovery_callback(
&self,
callback: Arc<dyn DiscoveryCallback>,
) -> Result<()>
fn register_discovery_callback( &self, callback: Arc<dyn DiscoveryCallback>, ) -> Result<()>
Register a discovery callback for endpoint events.
Auto Trait Implementations§
impl !Freeze for MockDdsInterface
impl RefUnwindSafe for MockDdsInterface
impl Send for MockDdsInterface
impl Sync for MockDdsInterface
impl Unpin for MockDdsInterface
impl UnsafeUnpin for MockDdsInterface
impl UnwindSafe for MockDdsInterface
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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