pub struct BackendCapabilities {
pub supported_languages: Vec<Language>,
pub isolation_class: String,
pub enforced_limits: EnforcedLimits,
}Available on crate feature
sandbox only.Expand description
Describes what a backend supports and enforces.
Callers can inspect capabilities to choose the right backend or to understand what isolation guarantees are provided.
§Example
use adk_sandbox::{BackendCapabilities, EnforcedLimits, Language};
let caps = BackendCapabilities {
supported_languages: vec![Language::Python, Language::JavaScript],
isolation_class: "process".to_string(),
enforced_limits: EnforcedLimits {
timeout: true,
memory: false,
network_isolation: false,
filesystem_isolation: false,
environment_isolation: true,
},
};
assert!(caps.enforced_limits.timeout);Fields§
§supported_languages: Vec<Language>Languages this backend can execute.
isolation_class: StringIsolation class identifier (e.g., "process", "wasm", "container").
enforced_limits: EnforcedLimitsWhich resource limits the backend actually enforces.
Trait Implementations§
Source§impl Clone for BackendCapabilities
impl Clone for BackendCapabilities
Source§fn clone(&self) -> BackendCapabilities
fn clone(&self) -> BackendCapabilities
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 moreAuto Trait Implementations§
impl Freeze for BackendCapabilities
impl RefUnwindSafe for BackendCapabilities
impl Send for BackendCapabilities
impl Sync for BackendCapabilities
impl Unpin for BackendCapabilities
impl UnsafeUnpin for BackendCapabilities
impl UnwindSafe for BackendCapabilities
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