Skip to main content

OperationsController

Struct OperationsController 

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

The routes of operations, under {http.api_prefix}/operations (default /api/operations). They mount when queue.operations.routes is true (the default) and the app has DatabaseModule and an authenticator. Every route needs a signed-in user; an operation is visible to its owner and to holders of operations.view (app-wide or in its workspace), and is a 404 to everyone else.

RouteAnswer
GET /operations?limit=20{data: [Operation]}: the user’s own operations, newest first
GET /operations/{id}the operation
GET /operations/{id}/eventstext/event-stream: an operation event now and after every change; ends after the finished state
DELETE /operations/{id}the operation, cancelled (owner or operations.cancel; 409 operation_finished once finished)

Trait Implementations§

Source§

impl Controller for OperationsController

Source§

fn prefix(&self) -> &'static str

The path prefix, e.g. /deals.
Source§

fn routes(self: Arc<Self>) -> Vec<RouteDef>

The routes, with paths relative to the prefix.
Source§

fn version(&self) -> Option<&'static str>

The API version ("1" mounts under /v1).
Source§

impl Injectable for OperationsController

Source§

fn dependencies() -> Vec<ProviderKey>

The keys construct resolves, used by the boot-time graph check. Keys resolved through Lazy are left out.
Source§

fn construct(r: Resolver) -> BoxFuture<'static, Result<Self, KernelError>>

Builds the value, resolving dependencies through r.
Source§

fn scope() -> Scope

The provider scope; singletons by default.

Auto Trait Implementations§

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<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> Same for T

Source§

type Output = T

Should always be Self
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> ValueFor<Option<T>> for T

Source§

fn into_value_for(self) -> Option<T>

The value as the column’s type.
Source§

impl<T> ValueFor<T> for T

Source§

fn into_value_for(self) -> T

The value as the column’s type.
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