pub struct DeveloperMessage {
pub id: MessageId,
pub role: Role,
pub content: String,
pub name: Option<String>,
}Expand description
A developer message, typically for debugging purposes. Not to be confused with system messages.
Fields§
§id: MessageIdUnique identifier for this message.
role: RoleThe role (always Developer).
content: StringThe text content of the message.
name: Option<String>Optional name for the sender.
Implementations§
Source§impl DeveloperMessage
impl DeveloperMessage
Sourcepub fn new(id: impl Into<MessageId>, content: String) -> DeveloperMessage
pub fn new(id: impl Into<MessageId>, content: String) -> DeveloperMessage
Creates a new developer message with the given ID and content.
Sourcepub fn with_name(self, name: String) -> DeveloperMessage
pub fn with_name(self, name: String) -> DeveloperMessage
Sets the name for this message.
Trait Implementations§
Source§impl Clone for DeveloperMessage
impl Clone for DeveloperMessage
Source§fn clone(&self) -> DeveloperMessage
fn clone(&self) -> DeveloperMessage
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 DeveloperMessage
impl Debug for DeveloperMessage
Source§impl<'de> Deserialize<'de> for DeveloperMessage
impl<'de> Deserialize<'de> for DeveloperMessage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeveloperMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeveloperMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DeveloperMessage
impl PartialEq for DeveloperMessage
Source§impl Serialize for DeveloperMessage
impl Serialize for DeveloperMessage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DeveloperMessage
Auto Trait Implementations§
impl Freeze for DeveloperMessage
impl RefUnwindSafe for DeveloperMessage
impl Send for DeveloperMessage
impl Sync for DeveloperMessage
impl Unpin for DeveloperMessage
impl UnsafeUnpin for DeveloperMessage
impl UnwindSafe for DeveloperMessage
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