pub struct DingTalkStream { /* private fields */ }Expand description
DingTalk Stream Client
Implementations§
Source§impl DingTalkStream
impl DingTalkStream
pub async fn send_message<M: Into<RobotMessage>>( &self, message: M, ) -> Result<()>
Source§impl DingTalkStream
impl DingTalkStream
Sourcepub fn new(credential: Credential) -> Self
pub fn new(credential: Credential) -> Self
Create a new DingTalk Stream client
Sourcepub fn with_config(credential: Credential, config: ClientConfig) -> Self
pub fn with_config(credential: Credential, config: ClientConfig) -> Self
Create with custom configuration
Source§impl DingTalkStream
impl DingTalkStream
Sourcepub async fn register_event_handler<H: EventHandler + 'static>(
self,
handler: Arc<H>,
) -> Self
pub async fn register_event_handler<H: EventHandler + 'static>( self, handler: Arc<H>, ) -> Self
Register an event handler
Sourcepub async fn register_callback_handler<H: CallbackHandler + 'static>(
self,
handler: Arc<H>,
) -> Self
pub async fn register_callback_handler<H: CallbackHandler + 'static>( self, handler: Arc<H>, ) -> Self
Register a callback handler for a specific topic
Sourcepub async fn register_system_handler<H: SystemHandler + 'static>(
self,
handler: Arc<H>,
) -> Self
pub async fn register_system_handler<H: SystemHandler + 'static>( self, handler: Arc<H>, ) -> Self
Register a system handler
pub async fn register_lifecycle_listener<L: LifecycleListener + 'static>( self, listener: Arc<L>, ) -> Self
Source§impl DingTalkStream
impl DingTalkStream
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if connected
Sourcepub fn is_registered(&self) -> bool
pub fn is_registered(&self) -> bool
Check if registered
Sourcepub fn credential(&self) -> &Credential
pub fn credential(&self) -> &Credential
Get the credential
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
Get configuration
Auto Trait Implementations§
impl !Freeze for DingTalkStream
impl !RefUnwindSafe for DingTalkStream
impl Send for DingTalkStream
impl Sync for DingTalkStream
impl Unpin for DingTalkStream
impl UnsafeUnpin for DingTalkStream
impl !UnwindSafe for DingTalkStream
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