pub struct MqttSpecRegistry { /* private fields */ }Expand description
MQTT implementation of SpecRegistry
Implementations§
Source§impl MqttSpecRegistry
impl MqttSpecRegistry
pub fn new() -> Self
pub fn add_fixture(&mut self, fixture: MqttFixture)
pub fn find_fixture_by_topic(&self, topic: &str) -> Option<&MqttFixture>
Trait Implementations§
Source§impl Default for MqttSpecRegistry
impl Default for MqttSpecRegistry
Source§impl SpecRegistry for MqttSpecRegistry
impl SpecRegistry for MqttSpecRegistry
Source§fn operations(&self) -> Vec<SpecOperation>
fn operations(&self) -> Vec<SpecOperation>
Get all available operations/routes in this spec
Source§fn find_operation(&self, _operation: &str, path: &str) -> Option<SpecOperation>
fn find_operation(&self, _operation: &str, path: &str) -> Option<SpecOperation>
Find an operation by path/name
Source§fn validate_request(
&self,
request: &ProtocolRequest,
) -> Result<ValidationResult>
fn validate_request( &self, request: &ProtocolRequest, ) -> Result<ValidationResult>
Validate a request against the spec
Source§fn generate_mock_response(
&self,
request: &ProtocolRequest,
) -> Result<ProtocolResponse>
fn generate_mock_response( &self, request: &ProtocolRequest, ) -> Result<ProtocolResponse>
Generate a mock response for a request
Auto Trait Implementations§
impl Freeze for MqttSpecRegistry
impl RefUnwindSafe for MqttSpecRegistry
impl Send for MqttSpecRegistry
impl Sync for MqttSpecRegistry
impl Unpin for MqttSpecRegistry
impl UnwindSafe for MqttSpecRegistry
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