pub struct RuntimeClient { /* private fields */ }Implementations§
Source§impl RuntimeClient
impl RuntimeClient
pub fn auto() -> Self
pub fn daemon() -> Self
pub fn daemon_with_token(token: impl Into<String>) -> Self
pub fn local() -> Self
Sourcepub fn health(&self) -> Result<RuntimeRead<RuntimeHealth>>
pub fn health(&self) -> Result<RuntimeRead<RuntimeHealth>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn snapshot(&self) -> Result<RuntimeRead<RuntimeSnapshot>>
pub fn snapshot(&self) -> Result<RuntimeRead<RuntimeSnapshot>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn dashboard(&self) -> Result<RuntimeRead<RuntimeDashboard>>
pub fn dashboard(&self) -> Result<RuntimeRead<RuntimeDashboard>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn diagnostics(&self) -> Result<RuntimeRead<RuntimeDiagnostics>>
pub fn diagnostics(&self) -> Result<RuntimeRead<RuntimeDiagnostics>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn hygiene_preview(&self) -> Result<RuntimeRead<RuntimeHygienePreview>>
pub fn hygiene_preview(&self) -> Result<RuntimeRead<RuntimeHygienePreview>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn hygiene_archive(&self) -> Result<RuntimeRead<RuntimeHygieneArchive>>
pub fn hygiene_archive(&self) -> Result<RuntimeRead<RuntimeHygieneArchive>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn task_detail(&self, id: &str) -> Result<RuntimeRead<RuntimeTaskDetail>>
pub fn task_detail(&self, id: &str) -> Result<RuntimeRead<RuntimeTaskDetail>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn approval_detail(
&self,
id: &str,
) -> Result<RuntimeRead<RuntimeApprovalDetail>>
pub fn approval_detail( &self, id: &str, ) -> Result<RuntimeRead<RuntimeApprovalDetail>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn checkpoint_detail(
&self,
id: &str,
) -> Result<RuntimeRead<RuntimeCheckpointDetail>>
pub fn checkpoint_detail( &self, id: &str, ) -> Result<RuntimeRead<RuntimeCheckpointDetail>>
§Errors
Errors if the daemon rejects the request or answers with an unexpected shape, and – when the call falls back to the local database – if that read fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn list_tasks(&self, limit: usize) -> Result<RuntimeRead<Vec<TaskRecord>>>
pub fn list_tasks(&self, limit: usize) -> Result<RuntimeRead<Vec<TaskRecord>>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn list_processes(
&self,
limit: usize,
) -> Result<RuntimeRead<Vec<ProcessRecord>>>
pub fn list_processes( &self, limit: usize, ) -> Result<RuntimeRead<Vec<ProcessRecord>>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn list_approvals(&self) -> Result<RuntimeRead<Vec<ApprovalRecord>>>
pub fn list_approvals(&self) -> Result<RuntimeRead<Vec<ApprovalRecord>>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn list_tool_runs(
&self,
limit: usize,
) -> Result<RuntimeRead<Vec<ToolRunRecord>>>
pub fn list_tool_runs( &self, limit: usize, ) -> Result<RuntimeRead<Vec<ToolRunRecord>>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn list_checkpoints(
&self,
limit: usize,
) -> Result<RuntimeRead<Vec<CheckpointRecord>>>
pub fn list_checkpoints( &self, limit: usize, ) -> Result<RuntimeRead<Vec<CheckpointRecord>>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn list_plugins(&self) -> Result<RuntimeRead<Vec<PluginInstallRecord>>>
pub fn list_plugins(&self) -> Result<RuntimeRead<Vec<PluginInstallRecord>>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn process_log(
&self,
id: &str,
tail_bytes: Option<u64>,
) -> Result<RuntimeProcessLog>
pub fn process_log( &self, id: &str, tail_bytes: Option<u64>, ) -> Result<RuntimeProcessLog>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn stop_process(&self, id: &str) -> Result<RuntimeOne<ProcessRecord>>
pub fn stop_process(&self, id: &str) -> Result<RuntimeOne<ProcessRecord>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn restart_process(&self, id: &str) -> Result<RuntimeOne<ProcessRecord>>
pub fn restart_process(&self, id: &str) -> Result<RuntimeOne<ProcessRecord>>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn open_process(&self, id: &str) -> Result<RuntimeProcessOpen>
pub fn open_process(&self, id: &str) -> Result<RuntimeProcessOpen>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn ports(&self) -> Result<RuntimePorts>
pub fn ports(&self) -> Result<RuntimePorts>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn approve(&self, id: &str) -> Result<RuntimeApprovalDecision>
pub fn approve(&self, id: &str) -> Result<RuntimeApprovalDecision>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn deny(&self, id: &str) -> Result<RuntimeApprovalDecision>
pub fn deny(&self, id: &str) -> Result<RuntimeApprovalDecision>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn restore_checkpoint(&self, id: &str) -> Result<RuntimeCheckpointRestore>
pub fn restore_checkpoint(&self, id: &str) -> Result<RuntimeCheckpointRestore>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn set_plugin_enabled(&self, id: &str, enabled: bool) -> Result<()>
pub fn set_plugin_enabled(&self, id: &str, enabled: bool) -> Result<()>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn model_info(&self, model: &str) -> Result<Value>
pub fn model_info(&self, model: &str) -> Result<Value>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Sourcepub fn set_safety_mode(&self, mode: &str) -> Result<Value>
pub fn set_safety_mode(&self, mode: &str) -> Result<Value>
§Errors
Errors if the daemon rejects the action or answers with an unexpected shape, and – when the call falls back to acting on the local database – if that fails. A daemon that is simply not running is not an error: the client falls back.
Trait Implementations§
Source§impl Clone for RuntimeClient
impl Clone for RuntimeClient
Source§fn clone(&self) -> RuntimeClient
fn clone(&self) -> RuntimeClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeClient
impl RefUnwindSafe for RuntimeClient
impl Send for RuntimeClient
impl Sync for RuntimeClient
impl Unpin for RuntimeClient
impl UnsafeUnpin for RuntimeClient
impl UnwindSafe for RuntimeClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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)
&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)
&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> ⓘ
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