Skip to main content

TagBehavior

Trait TagBehavior 

Source
pub trait TagBehavior {
    // Required methods
    fn list_tags(
        &self,
        assignable: Option<bool>,
    ) -> impl Future<Output = Result<TagsDTO, Error>> + Send;
    fn get_tag_sidebar_links(
        &self,
        slug: &str,
    ) -> impl Future<Output = Result<TagSidebarLinksDTO, Error>> + Send;
}
Expand description

分区(标签)接口,来自文档的「分区标签」章节 (https://pickcat-docs.xiaole6324.fun/tag.html)。

Required Methods§

Source

fn list_tags( &self, assignable: Option<bool>, ) -> impl Future<Output = Result<TagsDTO, Error>> + Send

GET /api/v1/tags —— 公开。assignable = true 时只返回可发帖分区。

GET /api/v1/tags/{slug}/sidebar-links —— 公开。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§