pub struct MiddlewareCall {
pub call_id: String,
pub vault: Vec<VaultValue>,
pub when: i32,
pub type: String,
pub scheduled: Option<Command>,
pub request: Option<Request>,
pub outcome: Option<Outcome>,
}Expand description
A request for a middleware to check: pass it with an empty verdict or reject it. Answer with
a Verdict of the same call_id, also after (where it may only count for a query’s response).
Fields§
§call_id: String§vault: Vec<VaultValue>Before a command only: its vault values, if the key may read them (granted vault_read).
when: i32§type: StringThe qualified type being checked: shop.AddItem, shop.GetCart, or for files and the
cache shop.PutData, shop.GetData, shop.DeleteData, shop.ListData, shop.SetCache, shop.GetCache,
shop.DeleteCache; for a cancel the scheduled command’s type.
scheduled: Option<Command>A cancel only: the scheduled command it cancels, as stored.
request: Option<Request>§outcome: Option<Outcome>Implementations§
Trait Implementations§
Source§impl Clone for MiddlewareCall
impl Clone for MiddlewareCall
Source§impl Debug for MiddlewareCall
impl Debug for MiddlewareCall
Source§impl Default for MiddlewareCall
impl Default for MiddlewareCall
Source§impl Message for MiddlewareCall
impl Message for MiddlewareCall
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for MiddlewareCall
impl PartialEq for MiddlewareCall
impl StructuralPartialEq for MiddlewareCall
Auto Trait Implementations§
impl Forget for MiddlewareCall
impl Freeze for MiddlewareCallwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<VaultValue>: Freeze,
PhantomData<Attribute>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Event>: Freeze,
*const Requirement is !null: Freeze,
PhantomData<Requirement>: Freeze,
impl Move for MiddlewareCall
impl RefUnwindSafe for MiddlewareCall
impl Send for MiddlewareCall
impl Sync for MiddlewareCall
impl Unpin for MiddlewareCall
impl UnsafeUnpin for MiddlewareCallwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<VaultValue>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Event>: UnsafeUnpin,
*const Requirement is !null: UnsafeUnpin,
PhantomData<Requirement>: UnsafeUnpin,
impl UnwindSafe for MiddlewareCall
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request