pub struct RpcNotification {
pub jsonrpc: String,
pub method: String,
pub params: Option<Value>,
}Expand description
JSON RPC Notification (outgoing event, no id expected)
Fields§
§jsonrpc: StringJSON RPC version, always “2.0”
method: StringEvent method name
params: Option<Value>Event parameters
Implementations§
Source§impl RpcNotification
impl RpcNotification
Sourcepub fn agent_started(task_id: &str) -> Self
pub fn agent_started(task_id: &str) -> Self
Create agent started event
Sourcepub fn agent_output(task_id: &str, line: &str) -> Self
pub fn agent_output(task_id: &str, line: &str) -> Self
Create agent output event
Sourcepub fn agent_completed(
task_id: &str,
success: bool,
exit_code: Option<i32>,
duration_ms: u64,
) -> Self
pub fn agent_completed( task_id: &str, success: bool, exit_code: Option<i32>, duration_ms: u64, ) -> Self
Create agent completed event
Sourcepub fn agent_spawn_failed(task_id: &str, error: &str) -> Self
pub fn agent_spawn_failed(task_id: &str, error: &str) -> Self
Create agent spawn failed event
Sourcepub fn server_ready(version: &str) -> Self
pub fn server_ready(version: &str) -> Self
Create server ready event
Sourcepub fn server_shutdown() -> Self
pub fn server_shutdown() -> Self
Create server shutdown event
Trait Implementations§
Source§impl Clone for RpcNotification
impl Clone for RpcNotification
Source§fn clone(&self) -> RpcNotification
fn clone(&self) -> RpcNotification
Returns a duplicate of the value. Read more
1.0.0 · 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 RpcNotification
impl Debug for RpcNotification
Source§impl<'de> Deserialize<'de> for RpcNotification
impl<'de> Deserialize<'de> for RpcNotification
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 RpcNotification
impl RefUnwindSafe for RpcNotification
impl Send for RpcNotification
impl Sync for RpcNotification
impl Unpin for RpcNotification
impl UnwindSafe for RpcNotification
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> 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