Struct httptest::ServerBuilder
source · pub struct ServerBuilder { /* private fields */ }
Expand description
Custom Server Builder.
Implementations§
source§impl ServerBuilder
impl ServerBuilder
sourcepub fn new() -> ServerBuilder
pub fn new() -> ServerBuilder
Create a new ServerBuilder. By default the server will listen on ipv6 loopback if available and fallback to ipv4 loopback if unable to bind to ipv6.
sourcepub fn bind_addr(self, bind_addr: SocketAddr) -> ServerBuilder
pub fn bind_addr(self, bind_addr: SocketAddr) -> ServerBuilder
Specify the address the server should listen on.
Auto Trait Implementations§
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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