pub struct OperationContract {
pub id: String,
pub request: String,
pub response: String,
pub visibility: i32,
pub policy: Option<OperationPolicy>,
pub fingerprint: Vec<u8>,
pub description: String,
pub replay_safe: bool,
pub lane: String,
}Expand description
Declares an operation’s routing identity, payload shapes, visibility and execution policy before activation.
Fields§
§id: StringUnique among the host and all connected plugins, for example “example.set”.
request: StringFully qualified message names found in Declarations.types.
response: StringFully qualified response message name resolved in Declarations.types.
visibility: i32Wire declarations admit Public or Protected; Private remains process-local and Unspecified is invalid.
policy: Option<OperationPolicy>Callee-owned execution budgets; the admitted declarations must provide a valid policy.
fingerprint: Vec<u8>SHA-256 over the id and the request and response definitions.
description: String§replay_safe: boolOnly explicitly replay-safe operations may retry transient failures.
lane: StringName in Declarations.lanes; empty uses the plugin instance’s unbounded default. Lifecycle operations cannot name a lane.
Implementations§
Source§impl OperationContract
impl OperationContract
Sourcepub fn visibility(&self) -> Visibility
pub fn visibility(&self) -> Visibility
Returns the enum value of visibility, or the default if the field is set to an invalid enum value.
Sourcepub fn set_visibility(&mut self, value: Visibility)
pub fn set_visibility(&mut self, value: Visibility)
Sets visibility to the provided enum value.
Trait Implementations§
Source§impl Clone for OperationContract
impl Clone for OperationContract
Source§impl Debug for OperationContract
impl Debug for OperationContract
Source§impl Default for OperationContract
impl Default for OperationContract
impl Eq for OperationContract
Source§impl Hash for OperationContract
impl Hash for OperationContract
Source§impl Message for OperationContract
impl Message for OperationContract
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self.Source§impl PartialEq for OperationContract
impl PartialEq for OperationContract
Source§impl ReflectMessage for OperationContract
impl ReflectMessage for OperationContract
Source§fn descriptor(&self) -> MessageDescriptor
fn descriptor(&self) -> MessageDescriptor
MessageDescriptor describing the type of this message.Source§fn transcode_to_dynamic(&self) -> DynamicMessagewhere
Self: Sized,
fn transcode_to_dynamic(&self) -> DynamicMessagewhere
Self: Sized,
DynamicMessage by going
through the byte representation.impl StructuralPartialEq for OperationContract
Auto Trait Implementations§
impl Forget for OperationContract
impl Freeze for OperationContract
impl Move for OperationContract
impl RefUnwindSafe for OperationContract
impl Send for OperationContractwhere
RawVecInner: Send,
impl Sync for OperationContractwhere
RawVecInner: Sync,
impl Unpin for OperationContract
impl UnsafeUnpin for OperationContract
impl UnwindSafe for OperationContractwhere
RawVecInner: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
T in a tonic::Request