pub struct GuidanceMessage {
pub id: String,
pub execution_id: ExecutionId,
pub from: GuidanceSource,
pub content: String,
pub context: Option<Value>,
pub priority: GuidancePriority,
pub created_at: DateTime<Utc>,
}Expand description
Guidance message - user or system guidance
Fields§
§id: StringUnique message ID
execution_id: ExecutionIdTarget execution
from: GuidanceSourceSource of guidance
content: StringGuidance content
context: Option<Value>Additional context
priority: GuidancePriorityPriority level
created_at: DateTime<Utc>When the message was created
Implementations§
Source§impl GuidanceMessage
impl GuidanceMessage
Sourcepub fn from_user(execution_id: ExecutionId, content: impl Into<String>) -> Self
pub fn from_user(execution_id: ExecutionId, content: impl Into<String>) -> Self
Create a new guidance message from user
Sourcepub fn with_priority(self, priority: GuidancePriority) -> Self
pub fn with_priority(self, priority: GuidancePriority) -> Self
Set priority
Sourcepub fn with_context(self, context: Value) -> Self
pub fn with_context(self, context: Value) -> Self
Add context
Trait Implementations§
Source§impl Clone for GuidanceMessage
impl Clone for GuidanceMessage
Source§fn clone(&self) -> GuidanceMessage
fn clone(&self) -> GuidanceMessage
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 GuidanceMessage
impl Debug for GuidanceMessage
Source§impl<'de> Deserialize<'de> for GuidanceMessage
impl<'de> Deserialize<'de> for GuidanceMessage
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 GuidanceMessage
impl RefUnwindSafe for GuidanceMessage
impl Send for GuidanceMessage
impl Sync for GuidanceMessage
impl Unpin for GuidanceMessage
impl UnsafeUnpin for GuidanceMessage
impl UnwindSafe for GuidanceMessage
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