pub struct RepoId(/* private fields */);Expand description
A repository identifier.
Implementations§
Source§impl RepoId
impl RepoId
Sourcepub fn urn(&self) -> String
pub fn urn(&self) -> String
Format the identifier as a human-readable URN.
Eg. rad:z3XncAdkZjeK9mQS5Sdc4qhw98BUX.
Sourcepub fn from_urn(s: &str) -> Result<RepoId, IdError>
pub fn from_urn(s: &str) -> Result<RepoId, IdError>
Parse an identifier from the human-readable URN format. Accepts strings without the radicle prefix as well, for convenience.
Trait Implementations§
Source§impl BindableWithIndex for &RepoId
impl BindableWithIndex for &RepoId
Source§impl<'de> Deserialize<'de> for RepoId
impl<'de> Deserialize<'de> for RepoId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RepoId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RepoId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for RepoId
impl JsonSchema for RepoId
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
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 Ord for RepoId
impl Ord for RepoId
Source§impl PartialOrd for RepoId
impl PartialOrd for RepoId
Source§impl Serialize for RepoId
impl Serialize for RepoId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RepoId
impl Eq for RepoId
impl StructuralPartialEq for RepoId
Auto Trait Implementations§
impl Freeze for RepoId
impl RefUnwindSafe for RepoId
impl Send for RepoId
impl Sync for RepoId
impl Unpin for RepoId
impl UnsafeUnpin for RepoId
impl UnwindSafe for RepoId
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
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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 more