pub struct RoomMessage {
pub id: String,
pub position: u32,
pub role: Role,
pub parts: Vec<Part>,
pub author: Option<Author>,
pub reply_to: Option<String>,
pub model: Option<Text>,
pub created: i64,
}Expand description
One durable message in a room transcript, as the room sends it: its parts as they’re
stored (file refs, no bytes over the socket), its author and model as on Content.
Fields§
§id: String§position: u32§role: Role§parts: Vec<Part>§reply_to: Option<String>§model: Option<Text>The model that wrote a MODEL turn.
created: i64Implementations§
Source§impl RoomMessage
impl RoomMessage
Sourcepub fn from_json(
json: &Value,
authorization: &CredentialsOrApiKey,
target: &ChatTarget,
) -> RoomMessage
pub fn from_json( json: &Value, authorization: &CredentialsOrApiKey, target: &ChatTarget, ) -> RoomMessage
FILE parts arrive as { accessCode | path | ref } and stream lazily through drive::File.
Trait Implementations§
Source§impl Clone for RoomMessage
impl Clone for RoomMessage
Auto Trait Implementations§
impl Forget for RoomMessage
impl Freeze for RoomMessagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Part>: Freeze,
PhantomData<String>: Freeze,
impl Move for RoomMessage
impl RefUnwindSafe for RoomMessage
impl Send for RoomMessage
impl Sync for RoomMessage
impl Unpin for RoomMessage
impl UnsafeUnpin for RoomMessagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Part>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for RoomMessage
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