Struct channel2::ChannelMessage
source · pub struct ChannelMessage {
pub id: ChannelMessageId,
pub body: String,
pub timestamp: OffsetDateTime,
pub sender: Arc<User>,
pub nonce: u128,
pub mentions: Vec<(Range<usize>, UserId)>,
}
Fields§
§id: ChannelMessageId
§body: String
§timestamp: OffsetDateTime
§sender: Arc<User>
§nonce: u128
§mentions: Vec<(Range<usize>, UserId)>
Implementations§
source§impl ChannelMessage
impl ChannelMessage
pub async fn from_proto( message: ChannelMessage, user_store: &Model<UserStore>, cx: &mut AsyncAppContext ) -> Result<Self>
pub fn is_pending(&self) -> bool
pub async fn from_proto_vec( proto_messages: Vec<ChannelMessage>, user_store: &Model<UserStore>, cx: &mut AsyncAppContext ) -> Result<Vec<Self>>
Trait Implementations§
source§impl Clone for ChannelMessage
impl Clone for ChannelMessage
source§fn clone(&self) -> ChannelMessage
fn clone(&self) -> ChannelMessage
Returns a copy of the value. Read more
1.0.0 · 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 ChannelMessage
impl Debug for ChannelMessage
Auto Trait Implementations§
impl RefUnwindSafe for ChannelMessage
impl Send for ChannelMessage
impl Sync for ChannelMessage
impl Unpin for ChannelMessage
impl UnwindSafe for ChannelMessage
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