pub struct SetOpts {
pub phc_listener: Option<TcpListener>,
pub transcryptor_listener: Option<TcpListener>,
pub auths_listener: Option<TcpListener>,
}Expand description
Additional options for Set::new_opts.
Used by the integration tests to run the servers on pre-bound, ephemeral ports, so that
multiple Sets can run simultaneously. Each listener is try_cloned (the file descriptor
is dup’d) every time its server (re)starts — e.g. after discovery — so the originals are kept
alive (by the Runner, for as long as the server runs) to keep the port reserved.
Fields§
§phc_listener: Option<TcpListener>If set, PubHubs Central listens on this pre-bound socket instead of binding the address in
its config. Its advertised phc_url must point at the same port (not checked at runtime).
transcryptor_listener: Option<TcpListener>Like SetOpts::phc_listener, but for the transcryptor.
auths_listener: Option<TcpListener>Like SetOpts::phc_listener, but for the authentication server.
Implementations§
Source§impl SetOpts
impl SetOpts
Sourcefn take_listener(&mut self, name: Name) -> Option<TcpListener>
fn take_listener(&mut self, name: Name) -> Option<TcpListener>
Takes the pre-bound listener for the given server, if any.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetOpts
impl RefUnwindSafe for SetOpts
impl Send for SetOpts
impl Sync for SetOpts
impl Unpin for SetOpts
impl UnsafeUnpin for SetOpts
impl UnwindSafe for SetOpts
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more