pub struct WorkspaceProfile {
pub name: String,
pub allowed_domains: Vec<String>,
pub credential_profile: Option<String>,
pub memory_namespace: Option<String>,
pub audit_namespace: Option<String>,
pub tool_restrictions: Vec<String>,
}Expand description
A single client workspace profile.
Fields§
§name: StringHuman-readable workspace name (also used as directory name).
allowed_domains: Vec<String>Allowed domains for network access within this workspace.
credential_profile: Option<String>Credential profile name scoped to this workspace.
memory_namespace: Option<String>Memory namespace prefix for isolation.
audit_namespace: Option<String>Audit namespace prefix for isolation.
tool_restrictions: Vec<String>Tool names denied in this workspace (e.g. ["shell"] to block shell access).
Implementations§
Source§impl WorkspaceProfile
impl WorkspaceProfile
Sourcepub fn effective_memory_namespace(&self) -> &str
pub fn effective_memory_namespace(&self) -> &str
Effective memory namespace (falls back to workspace name).
Sourcepub fn effective_audit_namespace(&self) -> &str
pub fn effective_audit_namespace(&self) -> &str
Effective audit namespace (falls back to workspace name).
Sourcepub fn is_tool_restricted(&self, tool_name: &str) -> bool
pub fn is_tool_restricted(&self, tool_name: &str) -> bool
Returns true if the given tool name is restricted in this workspace.
Sourcepub fn is_domain_allowed(&self, domain: &str) -> bool
pub fn is_domain_allowed(&self, domain: &str) -> bool
Returns true if the given domain is allowed for this workspace. An empty allowlist means all domains are allowed.
Trait Implementations§
Source§impl Clone for WorkspaceProfile
impl Clone for WorkspaceProfile
Source§fn clone(&self) -> WorkspaceProfile
fn clone(&self) -> WorkspaceProfile
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 WorkspaceProfile
impl Debug for WorkspaceProfile
Source§impl<'de> Deserialize<'de> for WorkspaceProfile
impl<'de> Deserialize<'de> for WorkspaceProfile
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
Auto Trait Implementations§
impl Freeze for WorkspaceProfile
impl RefUnwindSafe for WorkspaceProfile
impl Send for WorkspaceProfile
impl Sync for WorkspaceProfile
impl Unpin for WorkspaceProfile
impl UnsafeUnpin for WorkspaceProfile
impl UnwindSafe for WorkspaceProfile
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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>
Converts
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>
Converts
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