pub struct DingTalkStreamClient { /* private fields */ }Expand description
DingTalk Stream 客户端
Implementations§
Source§impl DingTalkStreamClient
impl DingTalkStreamClient
Sourcepub fn builder(credential: Credential) -> ClientBuilder
pub fn builder(credential: Credential) -> ClientBuilder
创建 Builder
Sourcepub async fn get_access_token(&self) -> Result<String>
pub async fn get_access_token(&self) -> Result<String>
获取 access_token
Sourcepub async fn reset_access_token(&self)
pub async fn reset_access_token(&self)
重置 access_token 缓存
Sourcepub fn chatbot_replier(&self) -> ChatbotReplier
pub fn chatbot_replier(&self) -> ChatbotReplier
创建 ChatbotReplier
Sourcepub async fn upload_to_dingtalk(
&self,
image_content: &[u8],
filetype: &str,
filename: &str,
mimetype: &str,
) -> Result<String>
pub async fn upload_to_dingtalk( &self, image_content: &[u8], filetype: &str, filename: &str, mimetype: &str, ) -> Result<String>
上传文件到钉钉
Sourcepub fn start_forever(&mut self) -> Result<()>
pub fn start_forever(&mut self) -> Result<()>
同步启动(阻塞当前线程)
Auto Trait Implementations§
impl Freeze for DingTalkStreamClient
impl !RefUnwindSafe for DingTalkStreamClient
impl Send for DingTalkStreamClient
impl Sync for DingTalkStreamClient
impl Unpin for DingTalkStreamClient
impl UnsafeUnpin for DingTalkStreamClient
impl !UnwindSafe for DingTalkStreamClient
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