Skip to main content

Check

Struct Check 

Source
pub struct Check {
Show 13 fields pub kind: CheckKind, pub id: String, pub tenant: String, pub domain: String, pub type_name: String, pub aggregate_type: Option<String>, pub aggregate_id: Option<String>, pub target: Option<Target>, pub key: Option<String>, pub data: Value, pub request: RequestContext, pub outcome: Option<CheckOutcome>, pub store: Option<Store>,
}
Expand description

A command, query, cancel, file or cache request a middleware checks, before the kernel accepts or routes it or after (cancels, file and cache requests: before only): what the handler of Listener::middleware gets.

Fields§

§kind: CheckKind§id: String

The command or query ID (a cancel: the scheduled command’s); for a file or cache request, the kernel’s call ID.

§tenant: String§domain: String§type_name: String

The command or query type within the domain (a cancel: the scheduled command’s); for a file or cache request PutData, GetData, DeleteData, ListData, SetCache, GetCache or DeleteCache.

§aggregate_type: Option<String>

Commands and cancels.

§aggregate_id: Option<String>

Commands and cancels.

§target: Option<Target>

The aggregate the request is about, its type qualified: a command’s aggregate (shop.order, o-17; a cancel: the scheduled command’s), or the one a query declares (crate::query’s target, crate::QuerySchema::target). None for queries that declare none, and for file and cache requests.

§key: Option<String>

File and cache requests only: the file’s or value’s key.

§data: Value

The request’s payload; vault fields are null unless the key is granted vault_read. Value::Null for a file or cache request: the middleware never sees the file or value.

§request: RequestContext

Who sends it: check permissions here.

§outcome: Option<CheckOutcome>

After it, what came of the request; before it, None.

§store: Option<Store>

The listener’s store, if it has one (Listener::store): what the middleware learned from events, to decide with.

Trait Implementations§

Source§

impl Clone for Check

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Check

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Check

§

impl !UnwindSafe for Check

§

impl Forget for Check

§

impl Freeze for Check

§

impl Move for Check

§

impl Send for Check
where RawVecInner: Send, RawTable<usize>: Send, NodeRef<Owned, String, String, LeafOrInternal>: Send, BoxRaw<(String, String)>: Send, BoxRaw<Requirement>: Send, Arc<Mutex<Option<Connection>>>: Send, Arc<Atomic<u64>>: Send, Arc<Mutex<()>>: Send,

§

impl Sync for Check
where RawVecInner: Sync, RawTable<usize>: Sync, NodeRef<Owned, String, String, LeafOrInternal>: Sync, BoxRaw<(String, String)>: Sync, BoxRaw<Requirement>: Sync, Arc<Mutex<Option<Connection>>>: Sync, Arc<Atomic<u64>>: Sync, Arc<Mutex<()>>: Sync,

§

impl Unpin for Check

§

impl UnsafeUnpin for Check

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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