pub struct KafkaSpecRegistry { /* private fields */ }Expand description
Kafka-specific spec registry implementation
Implementations§
Source§impl KafkaSpecRegistry
impl KafkaSpecRegistry
Sourcepub async fn new(
config: KafkaConfig,
topics: Arc<RwLock<HashMap<String, Topic>>>,
) -> Result<Self>
pub async fn new( config: KafkaConfig, topics: Arc<RwLock<HashMap<String, Topic>>>, ) -> Result<Self>
Create a new Kafka spec registry
Sourcepub fn find_fixture_by_topic(&self, topic: &str) -> Option<Arc<KafkaFixture>>
pub fn find_fixture_by_topic(&self, topic: &str) -> Option<Arc<KafkaFixture>>
Find fixture by topic
Trait Implementations§
Source§impl Debug for KafkaSpecRegistry
impl Debug for KafkaSpecRegistry
Source§impl SpecRegistry for KafkaSpecRegistry
impl SpecRegistry for KafkaSpecRegistry
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 KafkaSpecRegistry
impl !RefUnwindSafe for KafkaSpecRegistry
impl Send for KafkaSpecRegistry
impl Sync for KafkaSpecRegistry
impl Unpin for KafkaSpecRegistry
impl !UnwindSafe for KafkaSpecRegistry
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