pub struct CategoryTaxonomy;Expand description
The built-in hierarchical category vocabulary shipped with every
tenant. Base columns only — name, description,
featured image, thumbnail, parent. The flat page_tag
story stays the tags vocabulary.
Trait Implementations§
Source§impl Default for CategoryTaxonomy
impl Default for CategoryTaxonomy
Source§impl TaxonomyHandler for CategoryTaxonomy
impl TaxonomyHandler for CategoryTaxonomy
Source§fn slug(&self) -> &'static str
fn slug(&self) -> &'static str
Stable identifier — the URL/registry key, unique across vocabularies.
Source§fn verbose_name(&self) -> &'static str
fn verbose_name(&self) -> &'static str
Human label for the admin nav + headings.
Source§fn hierarchical(&self) -> bool
fn hierarchical(&self) -> bool
true allows nested categories; false rejects any non-NULL parent.fn description(&self) -> Option<&'static str>
Source§fn ext_table(&self) -> Option<&'static str>
fn ext_table(&self) -> Option<&'static str>
Per-type extension table name (typed extra fields), or
None for a
base-columns-only vocabulary like the built-in category.Source§fn ext_widgets<'life0, 'life1, 'async_trait>(
&'life0 self,
_pool: &'life1 Pool,
_category_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Widget>, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ext_widgets<'life0, 'life1, 'async_trait>(
&'life0 self,
_pool: &'life1 Pool,
_category_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Widget>, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Extra field widgets for the category editor (custom vocabularies),
prefilled from the extension row. Rendered through the shared
_widget.html macro alongside the base fields.Source§fn save_ext<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_pool: &'life1 Pool,
_category_id: i64,
_form: &'life2 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(), ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_ext<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_pool: &'life1 Pool,
_category_id: i64,
_form: &'life2 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(), ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist the extension row from the posted form (custom vocabularies).
Auto Trait Implementations§
impl Forget for CategoryTaxonomy
impl Freeze for CategoryTaxonomy
impl RefUnwindSafe for CategoryTaxonomy
impl Send for CategoryTaxonomy
impl Sync for CategoryTaxonomy
impl Unpin for CategoryTaxonomy
impl UnsafeUnpin for CategoryTaxonomy
impl UnwindSafe for CategoryTaxonomy
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.