pub struct Designator(/* private fields */);Expand description
Names a tracker without conveying anything about it: <plugin>/<64 lowercase hex>, the
SHA-256 of <plugin>\n<identifier> over the backend’s own opaque identifier of itself —
a Linear workspace’s organization id, a GitHub Project’s node id — or, for a plugin whose
backend has none, alias/<public_alias>, the alias every host’s configuration of that
tracker declares identically.
The one spelling, validated wherever one is built or read, so a stored opaque edge cannot carry anything a designator does not.
Implementations§
Source§impl Designator
impl Designator
Sourcepub const ALIAS_PREFIX: &'static str = "alias"
pub const ALIAS_PREFIX: &'static str = "alias"
The prefix of a designator built from a configured public_alias.
Sourcepub fn of_backend(plugin: &str, identifier: &str) -> Result<Self, String>
pub fn of_backend(plugin: &str, identifier: &str) -> Result<Self, String>
The designator of a backend plugin identifies by identifier, its own opaque
identifier of itself.
§Errors
A message when plugin is not a plugin kind’s spelling — the pattern a source name
matches — or is Self::ALIAS_PREFIX, which an alias designator’s prefix is.
Sourcepub fn of_alias(alias: &str) -> Result<Self, String>
pub fn of_alias(alias: &str) -> Result<Self, String>
The designator of a tracker whose configuration declares alias as its
public_alias.
§Errors
A message naming the pattern when alias is not one.
Sourcepub fn is_public_alias(alias: &str) -> bool
pub fn is_public_alias(alias: &str) -> bool
Whether alias is a valid public_alias: ^[A-Za-z0-9_-]{16,64}$.
Sourcepub fn prefix(&self) -> &str
pub fn prefix(&self) -> &str
What comes before the /: the plugin whose backend it digests, or
Self::ALIAS_PREFIX.
Trait Implementations§
Source§impl Clone for Designator
impl Clone for Designator
Source§impl Debug for Designator
impl Debug for Designator
Source§impl<'de> Deserialize<'de> for Designator
impl<'de> Deserialize<'de> for Designator
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>,
Source§impl Display for Designator
impl Display for Designator
impl Eq for Designator
Source§impl Hash for Designator
impl Hash for Designator
Source§impl JsonSchema for Designator
impl JsonSchema for Designator
Source§fn json_schema(_generator: &mut SchemaGenerator) -> Schema
fn json_schema(_generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more