pub struct MeshRepositoryIdentity {
pub id: String,
pub basis: MeshRepositoryBasis,
pub detail: String,
}Expand description
A repository’s mesh identity, carried by every advertisement, link and event, together
with the account of where it came from. The detail exists so that a person told two
checkouts are not the same repository can see what each one was derived from instead of
comparing two opaque digests.
use majordomus_cli::mesh::repository::MeshRepositoryIdentity;
use majordomus_cli::mesh::repository::of_root_commits;
let identity: MeshRepositoryIdentity = of_root_commits(&["a".repeat(40)]);
assert_eq!(identity.id.len(), 32, "32 hex characters, on every machine");
assert_eq!(identity.detail, "aaaaaaaaaaaa", "the evidence, short enough to read");Fields§
§id: String32 hex: what advertisements, links and events carry.
basis: MeshRepositoryBasisWhat it was derived from.
detail: StringThe evidence, human-readable: the declared value, or the root commits.
Trait Implementations§
Source§impl Clone for MeshRepositoryIdentity
impl Clone for MeshRepositoryIdentity
Source§fn clone(&self) -> MeshRepositoryIdentity
fn clone(&self) -> MeshRepositoryIdentity
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 MeshRepositoryIdentity
impl Debug for MeshRepositoryIdentity
Source§impl<'de> Deserialize<'de> for MeshRepositoryIdentity
impl<'de> Deserialize<'de> for MeshRepositoryIdentity
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 MeshRepositoryIdentity
Source§impl JsonSchema for MeshRepositoryIdentity
impl JsonSchema for MeshRepositoryIdentity
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 PartialEq for MeshRepositoryIdentity
impl PartialEq for MeshRepositoryIdentity
Source§fn eq(&self, other: &MeshRepositoryIdentity) -> bool
fn eq(&self, other: &MeshRepositoryIdentity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MeshRepositoryIdentity
impl Serialize for MeshRepositoryIdentity
impl StructuralPartialEq for MeshRepositoryIdentity
Auto Trait Implementations§
impl Freeze for MeshRepositoryIdentity
impl RefUnwindSafe for MeshRepositoryIdentity
impl Send for MeshRepositoryIdentity
impl Sync for MeshRepositoryIdentity
impl Unpin for MeshRepositoryIdentity
impl UnsafeUnpin for MeshRepositoryIdentity
impl UnwindSafe for MeshRepositoryIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.