pub struct OperationRequest<P> { /* private fields */ }Expand description
Typed request envelope for one concrete operation definition.
Implementations§
Source§impl<P> OperationRequest<P>
impl<P> OperationRequest<P>
Sourcepub fn new<O>(
context: OperationContext,
parameters: P,
) -> Result<Self, TargetRefError>where
O: OperationDefinition<Parameters = P>,
pub fn new<O>(
context: OperationContext,
parameters: P,
) -> Result<Self, TargetRefError>where
O: OperationDefinition<Parameters = P>,
Builds a request from a typed operation definition.
Adds product-issued authorization evidence.
Sourcepub fn validate_against(
&self,
spec: &OperationSpec,
now: Timestamp,
expected_plan: Option<&PlanFingerprint>,
) -> Result<(), RequestError>
pub fn validate_against( &self, spec: &OperationSpec, now: Timestamp, expected_plan: Option<&PlanFingerprint>, ) -> Result<(), RequestError>
Validates the request against catalog and authorization metadata.
Sourcepub fn context(&self) -> &OperationContext
pub fn context(&self) -> &OperationContext
Returns execution context.
Sourcepub fn operation(&self) -> &OperationName
pub fn operation(&self) -> &OperationName
Returns the canonical operation name.
Sourcepub fn parameters(&self) -> &P
pub fn parameters(&self) -> &P
Returns typed operation parameters.
Returns authorization evidence when supplied.
Trait Implementations§
Source§impl<P: Clone> Clone for OperationRequest<P>
impl<P: Clone> Clone for OperationRequest<P>
Source§fn clone(&self) -> OperationRequest<P>
fn clone(&self) -> OperationRequest<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug> Debug for OperationRequest<P>
impl<P: Debug> Debug for OperationRequest<P>
Source§impl<'de, P> Deserialize<'de> for OperationRequest<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for OperationRequest<P>where
P: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<P> JsonSchema for OperationRequest<P>where
P: JsonSchema,
impl<P> JsonSchema for OperationRequest<P>where
P: JsonSchema,
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl<P: PartialEq> PartialEq for OperationRequest<P>
impl<P: PartialEq> PartialEq for OperationRequest<P>
Source§fn eq(&self, other: &OperationRequest<P>) -> bool
fn eq(&self, other: &OperationRequest<P>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<P> Serialize for OperationRequest<P>where
P: Serialize,
impl<P> Serialize for OperationRequest<P>where
P: Serialize,
impl<P: Eq> Eq for OperationRequest<P>
impl<P> StructuralPartialEq for OperationRequest<P>
Auto Trait Implementations§
impl<P> Freeze for OperationRequest<P>where
P: Freeze,
impl<P> RefUnwindSafe for OperationRequest<P>where
P: RefUnwindSafe,
impl<P> Send for OperationRequest<P>where
P: Send,
impl<P> Sync for OperationRequest<P>where
P: Sync,
impl<P> Unpin for OperationRequest<P>where
P: Unpin,
impl<P> UnsafeUnpin for OperationRequest<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for OperationRequest<P>where
P: UnwindSafe,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.