pub enum IssueRef {
Id {
id: [u8; 8],
number: Option<u32>,
},
Number(u32),
}Expand description
A reference to one issue in the local graph.
Canonical ids are the only identity written by current code. A numeric value exists solely as an input and migration alias for data created before issue ids became authoritative.
Variants§
Id
The collision-resistant canonical issue id, stored uppercase.
Fields
Number(u32)
A human-facing issue number alias.
Implementations§
Source§impl IssueRef
impl IssueRef
Sourcepub fn id(value: impl Into<String>) -> Option<Self>
pub fn id(value: impl Into<String>) -> Option<Self>
Build a canonical id reference, validating the id’s shape.
Sourcepub fn with_number(self, value: u32) -> Self
pub fn with_number(self, value: u32) -> Self
Attach the resolved human alias to a canonical reference.
Sourcepub const fn as_number(&self) -> Option<u32>
pub const fn as_number(&self) -> Option<u32>
The numeric alias, when this reference stores one.
Sourcepub fn order_key(&self) -> (u32, String)
pub fn order_key(&self) -> (u32, String)
Stable ordering key that preserves the established human-facing order.
Canonical ids remain the edge identity. The numeric alias is used only to choose an arbitrary orientation for non-directional edges, a decision that predates canonical ids and must not change with random id values.
Trait Implementations§
impl Copy for IssueRef
Source§impl<'de> Deserialize<'de> for IssueRef
impl<'de> Deserialize<'de> for IssueRef
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for IssueRef
Source§impl Ord for IssueRef
impl Ord for IssueRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for IssueRef
impl RefUnwindSafe for IssueRef
impl Send for IssueRef
impl Sync for IssueRef
impl Unpin for IssueRef
impl UnsafeUnpin for IssueRef
impl UnwindSafe for IssueRef
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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