pub struct WireMessage {
pub id: String,
pub position: u32,
pub role: Role,
pub parts: Vec<Part>,
pub author: Option<Profile>,
pub reply_to: Option<String>,
pub model: Option<String>,
pub created: i64,
pub via: Option<String>,
}Expand description
One transcript message on the wire (parts keep file refs as streaming
drive::Files). Matches the room’s live chat-message shape.
Fields§
§id: String§position: u32§role: Role§parts: Vec<Part>§reply_to: Option<String>§model: Option<String>§created: i64§via: Option<String>The name of the API key an agent posted this with, for its author.
Implementations§
Source§impl WireMessage
impl WireMessage
Sourcepub fn from_json(
json: &Value,
authorization: &CredentialsOrApiKey,
target: &ChatTarget,
) -> WireMessage
pub fn from_json( json: &Value, authorization: &CredentialsOrApiKey, target: &ChatTarget, ) -> WireMessage
FILE parts arrive as { accessCode | path | ref } and stream lazily through drive::File.
Trait Implementations§
Source§impl Clone for WireMessage
impl Clone for WireMessage
Auto Trait Implementations§
impl Forget for WireMessage
impl Freeze for WireMessage
impl RefUnwindSafe for WireMessage
impl Send for WireMessage
impl Sync for WireMessage
impl Unpin for WireMessage
impl UnsafeUnpin for WireMessage
impl UnwindSafe for WireMessage
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