pub enum QueueItemIdentity {
Id(String),
FreeText(String),
}Expand description
Durable identity of a queue head.
Two heads share an identity iff they refer to the same work, regardless of
cosmetic pin / prefix variation (:pushpin: do [#abcd], do [#abcd], and
[#abcd] are one identity). Free-text heads key on whitespace-collapsed,
lowercased text so a verbatim re-emit collapses.
Variants§
Implementations§
Source§impl QueueItemIdentity
impl QueueItemIdentity
Sourcepub fn from_prompt(prompt: &str) -> Self
pub fn from_prompt(prompt: &str) -> Self
Resolve the durable identity of a queue head prompt. Id-backed heads key on the extracted id; everything else keys on normalized free text.
Sourcepub fn is_id_backed(&self) -> bool
pub fn is_id_backed(&self) -> bool
true for an id-backed identity.
Trait Implementations§
Source§impl Clone for QueueItemIdentity
impl Clone for QueueItemIdentity
Source§fn clone(&self) -> QueueItemIdentity
fn clone(&self) -> QueueItemIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueueItemIdentity
impl Debug for QueueItemIdentity
Source§impl<'de> Deserialize<'de> for QueueItemIdentity
impl<'de> Deserialize<'de> for QueueItemIdentity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for QueueItemIdentity
Source§impl Hash for QueueItemIdentity
impl Hash for QueueItemIdentity
Source§impl PartialEq for QueueItemIdentity
impl PartialEq for QueueItemIdentity
Source§fn eq(&self, other: &QueueItemIdentity) -> bool
fn eq(&self, other: &QueueItemIdentity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for QueueItemIdentity
impl Serialize for QueueItemIdentity
impl StructuralPartialEq for QueueItemIdentity
Auto Trait Implementations§
impl Freeze for QueueItemIdentity
impl RefUnwindSafe for QueueItemIdentity
impl Send for QueueItemIdentity
impl Sync for QueueItemIdentity
impl Unpin for QueueItemIdentity
impl UnsafeUnpin for QueueItemIdentity
impl UnwindSafe for QueueItemIdentity
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