pub struct Method {Show 13 fields
pub name: String,
pub kind: Method_Kind,
pub description: Option<String>,
pub request: Value,
pub response: Value,
pub capability: ActionName,
pub risk: RiskClass,
pub proof: Option<ProofLevel>,
pub approval: Option<ApprovalRequirement>,
pub policy_hooks: Option<Vec<String>>,
pub denial: Option<String>,
pub streaming_priority: Option<Method_StreamingPriority>,
pub conformance_tests: Option<Vec<String>>,
}Expand description
One RPC method.
Fields§
§name: StringMethod name, camelCase or snake_case, starts with a lowercase letter.
kind: Method_KindStreaming mode. unary: one request → one response. server-streaming: one request → many. client-streaming: many → one. bidi-streaming: many ↔ many. subscribe: one subscribe → many events with optional ack. command-channel: long-lived control with backpressure. bulk-transfer: chunked binary with content-hashing. telemetry: push-only with priority class. remote-shell: stdin/stdout stream. agent-session: bidi stream that carries the chain of responsibility. http-bridge: bidi stream that carries HTTP/1.1 or HTTP/2 frames (headers, chunks, trailers) for cross-site proxying.
description: Option<String>What this method does.
request: ValueInline JSON Schema describing the request body. Must be type:object with properties.
response: ValueInline JSON Schema describing the response body (or stream element for server-streaming).
capability: ActionNameName of the TrustForge capability required to invoke.
risk: RiskClassRisk class assigned to this method.
proof: Option<ProofLevel>Proof level at which successful calls are emitted.
approval: Option<ApprovalRequirement>Approval requirement for invocations; defaults to none.
policy_hooks: Option<Vec<String>>Names of policy hooks the daemon must consult before this method runs.
denial: Option<String>Optional human-readable denial reason if the method is forbidden in this trust domain.
streaming_priority: Option<Method_StreamingPriority>Priority class for streaming methods (TF-0011).
conformance_tests: Option<Vec<String>>Conformance vector files this method participates in.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Method
impl<'de> Deserialize<'de> for Method
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>,
impl Eq for Method
impl StructuralPartialEq for Method
Auto Trait Implementations§
impl Freeze for Method
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnsafeUnpin for Method
impl UnwindSafe for Method
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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