pub struct MockArchiver { /* private fields */ }Expand description
A running mock appliance. Serves on background threads until dropped.
Implementations§
Source§impl MockArchiver
impl MockArchiver
Sourcepub fn start(addr: SocketAddr) -> Result<Self>
pub fn start(addr: SocketAddr) -> Result<Self>
Bind addr (port 0 picks a free port: use MockArchiver::url)
and start serving.
Sourcepub fn start_local() -> Result<Self>
pub fn start_local() -> Result<Self>
Start on 127.0.0.1 with a free port: the usual test setup.
pub fn addr(&self) -> SocketAddr
Sourcepub fn serve_metadata(&self, on: bool)
pub fn serve_metadata(&self, on: bool)
Whether bpl/getMetadata is served (the default) or answers 404,
like a proxy that passes on only data and search requests.
Trait Implementations§
Source§impl Drop for MockArchiver
impl Drop for MockArchiver
Auto Trait Implementations§
impl !RefUnwindSafe for MockArchiver
impl !UnwindSafe for MockArchiver
impl Freeze for MockArchiver
impl Send for MockArchiver
impl Sync for MockArchiver
impl Unpin for MockArchiver
impl UnsafeUnpin for MockArchiver
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