Struct OwnedTextMessage
pub struct OwnedTextMessage {
pub message_type: MessageType,
pub sender_handle: Option<String>,
pub sequence: Option<MessageSequence>,
pub sequence_reset: bool,
pub regarding: Option<Regarding>,
pub editing: Option<u8>,
pub bg_color: Option<[u8; 3]>,
pub text_color: Option<[u8; 3]>,
pub channel_group_resend: bool,
pub extensions: OwnedExtensionOptions,
pub body: Vec<u8>,
}Expand description
Owned counterpart of TextMessage.
Fields§
§message_type: MessageType§sender_handle: Option<String>§sequence: Option<MessageSequence>§sequence_reset: bool§regarding: Option<Regarding>§editing: Option<u8>§bg_color: Option<[u8; 3]>§text_color: Option<[u8; 3]>§channel_group_resend: bool§extensions: OwnedExtensionOptions§body: Vec<u8>Implementations§
§impl OwnedTextMessage
impl OwnedTextMessage
pub fn basic(body: impl Into<String>) -> OwnedTextMessage
pub fn basic(body: impl Into<String>) -> OwnedTextMessage
A basic text message with the given body and no options.
pub fn as_borrowed(&self) -> TextMessage<'_>
Trait Implementations§
§impl Clone for OwnedTextMessage
impl Clone for OwnedTextMessage
§fn clone(&self) -> OwnedTextMessage
fn clone(&self) -> OwnedTextMessage
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for OwnedTextMessage
impl Debug for OwnedTextMessage
§impl From<TextMessage<'_>> for OwnedTextMessage
impl From<TextMessage<'_>> for OwnedTextMessage
§fn from(value: TextMessage<'_>) -> OwnedTextMessage
fn from(value: TextMessage<'_>) -> OwnedTextMessage
Converts to this type from the input type.
§impl PartialEq for OwnedTextMessage
impl PartialEq for OwnedTextMessage
impl Eq for OwnedTextMessage
impl StructuralPartialEq for OwnedTextMessage
Auto Trait Implementations§
impl Freeze for OwnedTextMessage
impl RefUnwindSafe for OwnedTextMessage
impl Send for OwnedTextMessage
impl Sync for OwnedTextMessage
impl Unpin for OwnedTextMessage
impl UnwindSafe for OwnedTextMessage
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)