pub struct GatewayThreadMessage { /* private fields */ }Expand description
A single message belonging to a GatewayThread.
Implementations§
Source§impl GatewayThreadMessage
impl GatewayThreadMessage
Sourcepub fn new(
id: impl Into<String>,
thread_id: impl Into<String>,
role: impl Into<String>,
content: impl Into<String>,
created_at_ms: u64,
) -> Self
pub fn new( id: impl Into<String>, thread_id: impl Into<String>, role: impl Into<String>, content: impl Into<String>, created_at_ms: u64, ) -> Self
Creates a thread message with the given id, thread, role, content, and time.
Sourcepub fn created_at_ms(&self) -> u64
pub fn created_at_ms(&self) -> u64
Returns the creation timestamp in milliseconds since the Unix epoch.
Trait Implementations§
Source§impl Clone for GatewayThreadMessage
impl Clone for GatewayThreadMessage
Source§fn clone(&self) -> GatewayThreadMessage
fn clone(&self) -> GatewayThreadMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GatewayThreadMessage
impl Debug for GatewayThreadMessage
impl Eq for GatewayThreadMessage
Source§impl PartialEq for GatewayThreadMessage
impl PartialEq for GatewayThreadMessage
Source§fn eq(&self, other: &GatewayThreadMessage) -> bool
fn eq(&self, other: &GatewayThreadMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GatewayThreadMessage
Auto Trait Implementations§
impl Freeze for GatewayThreadMessage
impl RefUnwindSafe for GatewayThreadMessage
impl Send for GatewayThreadMessage
impl Sync for GatewayThreadMessage
impl Unpin for GatewayThreadMessage
impl UnsafeUnpin for GatewayThreadMessage
impl UnwindSafe for GatewayThreadMessage
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