pub struct Services { /* private fields */ }Expand description
The services of a run: those that are known, and those that are up.
Implementations§
Source§impl Services
impl Services
pub fn new() -> Self
Sourcepub fn add(&mut self, service: impl Service + 'static)
pub fn add(&mut self, service: impl Service + 'static)
Makes a service known (by its name), without starting it.
pub fn with(self, service: impl Service + 'static) -> Self
Sourcepub fn missing(&self, names: &[&str]) -> Vec<String>
pub fn missing(&self, names: &[&str]) -> Vec<String>
The reason each of names cannot be had here, one line each: empty when all can.
Sourcepub fn start(&mut self, names: &[&str]) -> Result<(), String>
pub fn start(&mut self, names: &[&str]) -> Result<(), String>
Makes sure each of names is up, in that order: one that is up stays, one that died is
started again. The error says what cannot be had, or what failed to start.
Sourcepub fn restart(&mut self, names: &[&str]) -> Result<(), String>
pub fn restart(&mut self, names: &[&str]) -> Result<(), String>
Starts these afresh: stopped if they are up, then started. For a service that keeps state a test must not find (a database the last test wrote to).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Services
impl !Sync for Services
impl !UnwindSafe for Services
impl Freeze for Services
impl Send for Services
impl Unpin for Services
impl UnsafeUnpin for Services
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