pub struct TcpSpecRegistry { /* private fields */ }Expand description
Registry for TCP fixtures
Implementations§
Source§impl TcpSpecRegistry
impl TcpSpecRegistry
Sourcepub fn load_fixtures<P: AsRef<Path>>(&mut self, fixtures_dir: P) -> Result<()>
pub fn load_fixtures<P: AsRef<Path>>(&mut self, fixtures_dir: P) -> Result<()>
Load fixtures from a directory
Sourcepub fn add_fixture(&mut self, fixture: TcpFixture)
pub fn add_fixture(&mut self, fixture: TcpFixture)
Add a fixture to the registry
Sourcepub fn get_fixture(&self, identifier: &str) -> Option<&TcpFixture>
pub fn get_fixture(&self, identifier: &str) -> Option<&TcpFixture>
Get a fixture by identifier
Sourcepub fn find_matching_fixture(&self, data: &[u8]) -> Option<&TcpFixture>
pub fn find_matching_fixture(&self, data: &[u8]) -> Option<&TcpFixture>
Find a fixture matching the given data
Sourcepub fn get_all_fixtures(&self) -> Vec<&TcpFixture>
pub fn get_all_fixtures(&self) -> Vec<&TcpFixture>
Get all fixtures
Sourcepub fn remove_fixture(&mut self, identifier: &str) -> Option<TcpFixture>
pub fn remove_fixture(&mut self, identifier: &str) -> Option<TcpFixture>
Remove a fixture
Trait Implementations§
Source§impl Clone for TcpSpecRegistry
impl Clone for TcpSpecRegistry
Source§fn clone(&self) -> TcpSpecRegistry
fn clone(&self) -> TcpSpecRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TcpSpecRegistry
impl Debug for TcpSpecRegistry
Auto Trait Implementations§
impl Freeze for TcpSpecRegistry
impl RefUnwindSafe for TcpSpecRegistry
impl Send for TcpSpecRegistry
impl Sync for TcpSpecRegistry
impl Unpin for TcpSpecRegistry
impl UnwindSafe for TcpSpecRegistry
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