pub trait AuditContext: Send + Sync {
Show 15 methods
// Required methods
fn state_dir(&self) -> &str;
fn config(&self) -> &OpenClawConfig;
fn platform(&self) -> &str;
fn deployment_mode(&self) -> &str;
fn openclaw_version(&self) -> &str;
fn file_info<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = FileInfo> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn file_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_file_permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<u32>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn channels(&self) -> &[ChannelConfig] { ... }
fn skills(&self) -> &[SkillMetadata] { ... }
fn docker_compose(&self) -> Option<&DockerComposeConfig> { ... }
fn session_logs(&self) -> &[String] { ... }
fn connection_logs(&self) -> &[String] { ... }
}Expand description
Dependency-injected view of the host the agent runs on.
Sync getters expose already-loaded config/metadata; async methods perform
the actual filesystem reads (mocked in tests, tokio::fs in production).
Required Methods§
fn state_dir(&self) -> &str
fn config(&self) -> &OpenClawConfig
fn platform(&self) -> &str
fn deployment_mode(&self) -> &str
fn openclaw_version(&self) -> &str
fn file_info<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = FileInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn file_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn channels(&self) -> &[ChannelConfig]
fn skills(&self) -> &[SkillMetadata]
fn docker_compose(&self) -> Option<&DockerComposeConfig>
fn session_logs(&self) -> &[String]
fn connection_logs(&self) -> &[String]
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".