pub struct ChatDraftChangedAction {
pub draft: Option<Message>,
}Expand description
The chat’s draft input changed.
Clients MAY periodically sync their local input state — the message the user
is composing, including its {@link Message.model | model} /
{@link Message.agent | agent} selection and attachments — into the chat’s
{@link ChatState.draft | draft} so it survives reloads and is visible to
other clients viewing the same chat. Eager syncing is not required;
clients SHOULD debounce and MAY sync only at convenient points. Set draft
to undefined to clear it (e.g. once the message is sent).
A client is only allowed to draft {@link MessageKind.User} messages.
Fields§
§draft: Option<Message>New draft message, or undefined to clear it
Trait Implementations§
Source§impl Clone for ChatDraftChangedAction
impl Clone for ChatDraftChangedAction
Source§fn clone(&self) -> ChatDraftChangedAction
fn clone(&self) -> ChatDraftChangedAction
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 ChatDraftChangedAction
impl Debug for ChatDraftChangedAction
Source§impl Default for ChatDraftChangedAction
impl Default for ChatDraftChangedAction
Source§fn default() -> ChatDraftChangedAction
fn default() -> ChatDraftChangedAction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChatDraftChangedAction
impl<'de> Deserialize<'de> for ChatDraftChangedAction
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
Source§impl PartialEq for ChatDraftChangedAction
impl PartialEq for ChatDraftChangedAction
Source§fn eq(&self, other: &ChatDraftChangedAction) -> bool
fn eq(&self, other: &ChatDraftChangedAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ChatDraftChangedAction
impl Serialize for ChatDraftChangedAction
impl StructuralPartialEq for ChatDraftChangedAction
Auto Trait Implementations§
impl Freeze for ChatDraftChangedAction
impl RefUnwindSafe for ChatDraftChangedAction
impl Send for ChatDraftChangedAction
impl Sync for ChatDraftChangedAction
impl Unpin for ChatDraftChangedAction
impl UnsafeUnpin for ChatDraftChangedAction
impl UnwindSafe for ChatDraftChangedAction
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