pub struct RepositoryState {
pub identifier: String,
pub refs: Vec<GitRef>,
pub head: Option<String>,
}Expand description
Typed bundle for the kind: 30618 repository state.
Fields§
§identifier: Stringd tag — matches the Repository::identifier.
refs: Vec<GitRef>refs/... rows.
head: Option<String>HEAD symbolic ref (e.g. ref: refs/heads/main).
Implementations§
Source§impl RepositoryState
impl RepositoryState
Sourcepub fn new(identifier: impl Into<String>) -> Self
pub fn new(identifier: impl Into<String>) -> Self
Construct a state bundle bound to the addressable d
identifier.
Render the typed bundle to the public tag list.
Sourcepub fn from_event(event: &Event) -> Result<Self, Nip34Error>
pub fn from_event(event: &Event) -> Result<Self, Nip34Error>
Parse a signed kind-30618 event into a typed bundle.
§Errors
Returns Nip34Error::WrongKind for the wrong kind and
Nip34Error::MissingIdentifier when the d tag is absent.
Trait Implementations§
Source§impl Clone for RepositoryState
impl Clone for RepositoryState
Source§fn clone(&self) -> RepositoryState
fn clone(&self) -> RepositoryState
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 RepositoryState
impl Debug for RepositoryState
impl Eq for RepositoryState
Source§impl PartialEq for RepositoryState
impl PartialEq for RepositoryState
impl StructuralPartialEq for RepositoryState
Auto Trait Implementations§
impl Freeze for RepositoryState
impl RefUnwindSafe for RepositoryState
impl Send for RepositoryState
impl Sync for RepositoryState
impl Unpin for RepositoryState
impl UnsafeUnpin for RepositoryState
impl UnwindSafe for RepositoryState
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,
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.