pub enum SafetyClass {
InProcessTrusted,
SandboxedExecution,
LocalRuntimeExecution,
NetworkEgress,
}Expand description
What a dynamic provider’s handler is capable of doing when invoked,
classified from the provider manifest kind.
Variants§
InProcessTrusted
Trusted Rust compiled into this binary (static-rust).
SandboxedExecution
Guest code executed inside a sandboxed runtime (wasm).
LocalRuntimeExecution
Handlers executed by a local script runtime with host access
(ai-sdk TypeScript, python, langchain, llamaindex).
NetworkEgress
Handlers whose execution is a network call to an upstream service
(mcp, openapi).
Implementations§
Source§impl SafetyClass
impl SafetyClass
Sourcepub fn classify_provider_kind(kind: &str) -> Option<Self>
pub fn classify_provider_kind(kind: &str) -> Option<Self>
Classifies a provider manifest kind string. Unknown kinds return
None, which authorize denies with
reasons::DENIED_UNCLASSIFIED_TARGET.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Stable kebab-case identifier for this class, for logging and warnings.
Sourcepub fn requires_local_trust_when_inline(self) -> bool
pub fn requires_local_trust_when_inline(self) -> bool
Whether inline execution of this class additionally requires a trusted-local caller even when the affinity scope is held.
Trait Implementations§
Source§impl Clone for SafetyClass
impl Clone for SafetyClass
Source§fn clone(&self) -> SafetyClass
fn clone(&self) -> SafetyClass
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 Debug for SafetyClass
impl Debug for SafetyClass
Source§impl PartialEq for SafetyClass
impl PartialEq for SafetyClass
Source§fn eq(&self, other: &SafetyClass) -> bool
fn eq(&self, other: &SafetyClass) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SafetyClass
impl Eq for SafetyClass
impl StructuralPartialEq for SafetyClass
Auto Trait Implementations§
impl Freeze for SafetyClass
impl RefUnwindSafe for SafetyClass
impl Send for SafetyClass
impl Sync for SafetyClass
impl Unpin for SafetyClass
impl UnsafeUnpin for SafetyClass
impl UnwindSafe for SafetyClass
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.