pub struct GraphReplier { /* private fields */ }Expand description
Graph 回复工具
Implementations§
Source§impl GraphReplier
impl GraphReplier
Sourcepub const MARKDOWN_TEMPLATE_ID: &'static str = "d28e2ac5-fb34-4d93-94bc-cf5c580c2d4f.schema"
pub const MARKDOWN_TEMPLATE_ID: &'static str = "d28e2ac5-fb34-4d93-94bc-cf5c580c2d4f.schema"
Graph Markdown 模板 ID
Sourcepub fn new(http_client: HttpClient) -> Self
pub fn new(http_client: HttpClient) -> Self
创建新的 GraphReplier
Sourcepub async fn reply_markdown(
&self,
webhook: &str,
content: &str,
) -> Result<(u16, String)>
pub async fn reply_markdown( &self, webhook: &str, content: &str, ) -> Result<(u16, String)>
通过 webhook 回复 markdown
Sourcepub fn success_response(payload: Option<Value>) -> GraphResponse
pub fn success_response(payload: Option<Value>) -> GraphResponse
构建成功响应
Auto Trait Implementations§
impl Freeze for GraphReplier
impl !RefUnwindSafe for GraphReplier
impl Send for GraphReplier
impl Sync for GraphReplier
impl Unpin for GraphReplier
impl UnsafeUnpin for GraphReplier
impl !UnwindSafe for GraphReplier
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