pub struct ChatManager { /* private fields */ }Expand description
Chat manager
Implementations§
Source§impl ChatManager
impl ChatManager
Sourcepub fn new(storage: StorageManager, identity: EnhancedIdentity) -> Self
pub fn new(storage: StorageManager, identity: EnhancedIdentity) -> Self
Create new chat manager
Sourcepub async fn create_channel(
&mut self,
name: String,
description: String,
channel_type: ChannelType,
organization_id: Option<OrganizationId>,
) -> Result<Channel, ChatError>
pub async fn create_channel( &mut self, name: String, description: String, channel_type: ChannelType, organization_id: Option<OrganizationId>, ) -> Result<Channel, ChatError>
Create a new channel
Sourcepub async fn send_message(
&mut self,
channel_id: &ChannelId,
content: MessageContent,
thread_id: Option<ThreadId>,
attachments: Vec<Attachment>,
) -> Result<Message, ChatError>
pub async fn send_message( &mut self, channel_id: &ChannelId, content: MessageContent, thread_id: Option<ThreadId>, attachments: Vec<Attachment>, ) -> Result<Message, ChatError>
Send a message
Sourcepub async fn get_channel(
&self,
channel_id: &ChannelId,
) -> Result<Channel, ChatError>
pub async fn get_channel( &self, channel_id: &ChannelId, ) -> Result<Channel, ChatError>
Get channel by ID
Auto Trait Implementations§
impl !Freeze for ChatManager
impl !RefUnwindSafe for ChatManager
impl Send for ChatManager
impl Sync for ChatManager
impl Unpin for ChatManager
impl !UnwindSafe for ChatManager
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