struct SetInner {
joinset: JoinSet<Result<()>>,
shutdown_sender: Option<Sender<Infallible>>,
shutdown_receiver: Receiver<Infallible>,
}Expand description
A set of running PubHubs servers.
Fields§
§joinset: JoinSet<Result<()>>The servers’ tasks
shutdown_sender: Option<Sender<Infallible>>Via shutdown_sender Set broadcasts the instruction to shutdown to all servers
running in the joinset. It does so not by sending a message, but by dropping
the shutdown_sender.
shutdown_receiver: Receiver<Infallible>Via shutdown_receiver, the Set received the instruction to close.
Implementations§
Source§impl SetInner
impl SetInner
Sourcepub fn new(config: &Config) -> Result<(Self, Sender<Infallible>)>
pub fn new(config: &Config) -> Result<(Self, Sender<Infallible>)>
Creates a new set of PubHubs servers from the given config.
Returns not only the SetInner instance, but also a tokio::sync::oneshot::Sender<Infallible>
that can be dropped to signal the SetInner should shutdown.
fn run_server<S: Server>( config: Config, rt_handle: Handle, shutdown_receiver: Receiver<Infallible>, worker_count: Option<NonZero<usize>>, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetInner
impl !RefUnwindSafe for SetInner
impl Send for SetInner
impl Sync for SetInner
impl Unpin for SetInner
impl UnsafeUnpin for SetInner
impl !UnwindSafe for SetInner
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