pub enum Priority {
Low,
Medium,
High,
Other(String),
}Expand description
Issue priority.
The documented set is low / medium / high with medium as the
default (spec + data-model). Any other value is preserved as-is for
forward compatibility (data-model: “unknown values accepted as-is”,
“preserved … but not normalized”), so e.g. urgent round-trips
unchanged.
Variants§
Low
Medium
High
Other(String)
An unknown priority string, preserved verbatim (forward-compatible).
The empty string is not treated as unknown: it is an explicitly unset
priority, which tix lint accepts and which round-trips as ''. It stays
in this variant rather than getting a variant of its own because
Priority is public API on a published crate, and adding a variant to a
non-#[non_exhaustive] enum is a semver break for every downstream
match. Use Priority::is_undefined rather than comparing the string.
Implementations§
Source§impl Priority
impl Priority
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Whether the priority is explicitly unset — written priority: ''.
Distinct from Priority::default, which is Medium. An issue can
therefore say “no priority” without being read as “medium”, and without
the value being silently rewritten on the next write.
tix lint accepts this state; see crate::commands::lint for the
check it is exempt from.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Priority
impl<'de> Deserialize<'de> for Priority
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
impl Eq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnsafeUnpin for Priority
impl UnwindSafe for Priority
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more