Skip to main content

Running

Struct Running 

Source
pub struct Running { /* private fields */ }
Expand description

One server, serving.

Dropping this stops it, and so does Running::stop; nothing here outlives the handle a caller holds.

Implementations§

Source§

impl Running

Source

pub fn print_alignment(&self, print_id: PrintId) -> PrintAlignment

One print’s first-layer alignment verdict, which a check reads before drawing the planned toolpath on its image.

Source

pub const fn address(&self) -> SocketAddr

Where this server is answering.

Source

pub fn base_url(&self) -> String

The base URL of its versioned surface.

Source

pub fn ingress_url(&self) -> String

The URL its ingress endpoint answers on.

Source

pub const fn config(&self) -> &ServerConfig

What it was configured with.

Source

pub fn warnings(&self) -> &[String]

What this start found that its operator should change — a plaintext api.credential among them — in words that quote no credential. The program running the server writes each to its log on every start.

Source

pub const fn reconciliation(&self) -> &Reconciliation

What this start adopted from the store.

Source

pub const fn supervisor(&self) -> &Arc<Supervisor> ⓘ

The supervision core it is serving over.

Source

pub const fn stores(&self) -> &Stores

Durable state, as it is serving over it.

Source

pub fn completions(&self) -> Receiver<u64>

How many posts the ingress worker has finished handling, watchable while it works.

Source

pub async fn stop(self)

Stop serving, and wait for the last request to finish.

Source

pub async fn serve_until_signalled(self) -> Result<(), StartError>

Serve until the operating system asks this process to stop.

This is what the server subcommand runs. It answers however this platform asks a process to stop — see [stop_requested] — and every one of those ways enters the same shutdown: Running::stop.

§Errors

Returns StartError::State when the stop handlers cannot be installed, which is a process that could not be stopped cleanly.

Trait Implementations§

Source§

impl Debug for Running

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Running

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Running

§

impl !UnwindSafe for Running

§

impl Forget for Running

§

impl Freeze for Running
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const LeafNode<Adjustable, Range> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(Adjustable, Range)>>: Freeze, *const LeafNode<ActorClass, Vec<ActionKind>> is !null: Freeze, PhantomData<Box<(ActorClass, Vec<ActionKind>)>>: Freeze, NonZero<u64>: Freeze, *const ArcInner<CameraCalibration> is !null: Freeze, PhantomData<ArcInner<CameraCalibration>>: Freeze, *const LeafNode<MaterialName, Vec<SheetId>> is !null: Freeze, PhantomData<Box<(MaterialName, Vec<SheetId>)>>: Freeze, PhantomData<RecoveryActionKind>: Freeze, PhantomData<ActorClass>: Freeze, PhantomData<String>: Freeze, *const ArcInner<Supervisor> is !null: Freeze, PhantomData<ArcInner<Supervisor>>: Freeze, *const ArcInner<dyn PrintStore> is !null: Freeze, PhantomData<ArcInner<dyn PrintStore>>: Freeze, *const ArcInner<dyn EventStore> is !null: Freeze, PhantomData<ArcInner<dyn EventStore>>: Freeze, *const ArcInner<dyn ImageStore> is !null: Freeze, PhantomData<ArcInner<dyn ImageStore>>: Freeze, *const ArcInner<dyn ActionStore> is !null: Freeze, PhantomData<ArcInner<dyn ActionStore>>: Freeze, *const ArcInner<dyn SessionStore> is !null: Freeze, PhantomData<ArcInner<dyn SessionStore>>: Freeze, *const ArcInner<dyn FilamentStore> is !null: Freeze, PhantomData<ArcInner<dyn FilamentStore>>: Freeze, *const ArcInner<dyn TimelineStore> is !null: Freeze, PhantomData<ArcInner<dyn TimelineStore>>: Freeze, PhantomData<PrintId>: Freeze, PhantomData<InterventionId>: Freeze, PhantomData<EventId>: Freeze, *const ArcInner<Shared<u64>> is !null: Freeze, PhantomData<ArcInner<Shared<u64>>>: Freeze, *const ArcInner<Inner<()>> is !null: Freeze, PhantomData<ArcInner<Inner<()>>>: Freeze, *const Header is !null: Freeze, PhantomData<()>: Freeze, PhantomData<JoinHandle<()>>: Freeze, *const ArcInner<Alignments> is !null: Freeze, PhantomData<ArcInner<Alignments>>: Freeze,

§

impl Move for Running

§

impl Send for Running
where RawVecInner: Send, NodeRef<Owned, Adjustable, Range, LeafOrInternal>: Send, BoxRaw<(Adjustable, Range)>: Send, NodeRef<Owned, ActorClass, Vec<ActionKind>, LeafOrInternal>: Send, BoxRaw<(ActorClass, Vec<ActionKind>)>: Send, NonZero<u64>: Send, Arc<CameraCalibration>: Send, NodeRef<Owned, MaterialName, Vec<SheetId>, LeafOrInternal>: Send, BoxRaw<(MaterialName, Vec<SheetId>)>: Send, Arc<Supervisor>: Send, Arc<dyn PrintStore>: Send, Arc<dyn EventStore>: Send, Arc<dyn ImageStore>: Send, Arc<dyn ActionStore>: Send, Arc<dyn SessionStore>: Send, Arc<dyn FilamentStore>: Send, Arc<dyn TimelineStore>: Send, Arc<Shared<u64>>: Send, Arc<Inner<()>>: Send, JoinHandle<()>: Send, Arc<Alignments>: Send,

§

impl Sync for Running
where RawVecInner: Sync, NodeRef<Owned, Adjustable, Range, LeafOrInternal>: Sync, BoxRaw<(Adjustable, Range)>: Sync, NodeRef<Owned, ActorClass, Vec<ActionKind>, LeafOrInternal>: Sync, BoxRaw<(ActorClass, Vec<ActionKind>)>: Sync, NonZero<u64>: Sync, Arc<CameraCalibration>: Sync, NodeRef<Owned, MaterialName, Vec<SheetId>, LeafOrInternal>: Sync, BoxRaw<(MaterialName, Vec<SheetId>)>: Sync, Arc<Supervisor>: Sync, Arc<dyn PrintStore>: Sync, Arc<dyn EventStore>: Sync, Arc<dyn ImageStore>: Sync, Arc<dyn ActionStore>: Sync, Arc<dyn SessionStore>: Sync, Arc<dyn FilamentStore>: Sync, Arc<dyn TimelineStore>: Sync, Arc<Shared<u64>>: Sync, Arc<Inner<()>>: Sync, JoinHandle<()>: Sync, Arc<Alignments>: Sync,

§

impl Unpin for Running

§

impl UnsafeUnpin for Running
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const LeafNode<Adjustable, Range> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(Adjustable, Range)>>: UnsafeUnpin, *const LeafNode<ActorClass, Vec<ActionKind>> is !null: UnsafeUnpin, PhantomData<Box<(ActorClass, Vec<ActionKind>)>>: UnsafeUnpin, NonZeroU64Inner: UnsafeUnpin, *const ArcInner<CameraCalibration> is !null: UnsafeUnpin, PhantomData<ArcInner<CameraCalibration>>: UnsafeUnpin, *const LeafNode<MaterialName, Vec<SheetId>> is !null: UnsafeUnpin, PhantomData<Box<(MaterialName, Vec<SheetId>)>>: UnsafeUnpin, PhantomData<RecoveryActionKind>: UnsafeUnpin, PhantomData<ActorClass>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const ArcInner<Supervisor> is !null: UnsafeUnpin, PhantomData<ArcInner<Supervisor>>: UnsafeUnpin, *const ArcInner<dyn PrintStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn PrintStore>>: UnsafeUnpin, *const ArcInner<dyn EventStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn EventStore>>: UnsafeUnpin, *const ArcInner<dyn ImageStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ImageStore>>: UnsafeUnpin, *const ArcInner<dyn ActionStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ActionStore>>: UnsafeUnpin, *const ArcInner<dyn SessionStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn SessionStore>>: UnsafeUnpin, *const ArcInner<dyn FilamentStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn FilamentStore>>: UnsafeUnpin, *const ArcInner<dyn TimelineStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn TimelineStore>>: UnsafeUnpin, PhantomData<PrintId>: UnsafeUnpin, PhantomData<InterventionId>: UnsafeUnpin, PhantomData<EventId>: UnsafeUnpin, *const ArcInner<Shared<u64>> is !null: UnsafeUnpin, PhantomData<ArcInner<Shared<u64>>>: UnsafeUnpin, *const ArcInner<Inner<()>> is !null: UnsafeUnpin, PhantomData<ArcInner<Inner<()>>>: UnsafeUnpin, *const Header is !null: UnsafeUnpin, PhantomData<()>: UnsafeUnpin, PhantomData<JoinHandle<()>>: UnsafeUnpin, *const ArcInner<Alignments> is !null: UnsafeUnpin, PhantomData<ArcInner<Alignments>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more