pub struct SystemMessage {
pub subtype: String,
pub data: Value,
}Expand description
System message with metadata
Fields§
§subtype: String§data: ValueImplementations§
Source§impl SystemMessage
impl SystemMessage
Sourcepub fn is_compact_boundary(&self) -> bool
pub fn is_compact_boundary(&self) -> bool
Check if this is a compact_boundary message
Sourcepub fn as_init(&self) -> Option<InitMessage>
pub fn as_init(&self) -> Option<InitMessage>
Try to parse as an init message
Sourcepub fn as_status(&self) -> Option<StatusMessage>
pub fn as_status(&self) -> Option<StatusMessage>
Try to parse as a status message
Sourcepub fn as_compact_boundary(&self) -> Option<CompactBoundaryMessage>
pub fn as_compact_boundary(&self) -> Option<CompactBoundaryMessage>
Try to parse as a compact_boundary message
Sourcepub fn is_task_started(&self) -> bool
pub fn is_task_started(&self) -> bool
Check if this is a task_started message
Sourcepub fn is_task_progress(&self) -> bool
pub fn is_task_progress(&self) -> bool
Check if this is a task_progress message
Sourcepub fn is_task_notification(&self) -> bool
pub fn is_task_notification(&self) -> bool
Check if this is a task_notification message
Sourcepub fn as_task_started(&self) -> Option<TaskStartedMessage>
pub fn as_task_started(&self) -> Option<TaskStartedMessage>
Try to parse as a task_started message
Sourcepub fn as_task_progress(&self) -> Option<TaskProgressMessage>
pub fn as_task_progress(&self) -> Option<TaskProgressMessage>
Try to parse as a task_progress message
Sourcepub fn as_task_notification(&self) -> Option<TaskNotificationMessage>
pub fn as_task_notification(&self) -> Option<TaskNotificationMessage>
Try to parse as a task_notification message
Trait Implementations§
Source§impl Clone for SystemMessage
impl Clone for SystemMessage
Source§fn clone(&self) -> SystemMessage
fn clone(&self) -> SystemMessage
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 SystemMessage
impl Debug for SystemMessage
Source§impl<'de> Deserialize<'de> for SystemMessage
impl<'de> Deserialize<'de> for SystemMessage
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 SystemMessage
impl RefUnwindSafe for SystemMessage
impl Send for SystemMessage
impl Sync for SystemMessage
impl Unpin for SystemMessage
impl UnsafeUnpin for SystemMessage
impl UnwindSafe for SystemMessage
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