pub enum StatusNames {
Every(StatusName),
Task(StatusName),
Project(StatusName),
PerKind {
task: StatusName,
project: StatusName,
},
}Expand description
What one category of a status_mapping names: one name for every kind, or a name for
each kind it maps.
Four variants rather than a pair of optional names, so a per-kind object naming no kind — which the grammar refuses — is a value this type cannot hold.
Variants§
Every(StatusName)
The same name for a task and for a project: the bare-string form.
Task(StatusName)
{ task: … }: a name for a task, and the category unmapped for a project.
Project(StatusName)
{ project: … }: a name for a project, and the category unmapped for a task.
PerKind
{ task: …, project: … }: a name for each.
Implementations§
Source§impl StatusNames
impl StatusNames
Sourcepub fn for_kind(&self, kind: ItemKind) -> Option<&StatusName>
pub fn for_kind(&self, kind: ItemKind) -> Option<&StatusName>
The name this gives kind, or None where it leaves that kind unmapped.
Trait Implementations§
Source§impl Clone for StatusNames
impl Clone for StatusNames
Source§impl Debug for StatusNames
impl Debug for StatusNames
impl Eq for StatusNames
Source§impl JsonSchema for StatusNames
impl JsonSchema for StatusNames
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for StatusNames
impl PartialEq for StatusNames
Source§impl Serialize for StatusNames
impl Serialize for StatusNames
impl StructuralPartialEq for StatusNames
Auto Trait Implementations§
impl Freeze for StatusNames
impl RefUnwindSafe for StatusNames
impl Send for StatusNames
impl Sync for StatusNames
impl Unpin for StatusNames
impl UnsafeUnpin for StatusNames
impl UnwindSafe for StatusNames
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