pub struct Repository {
pub identifier: String,
pub name: Option<String>,
pub description: Option<String>,
pub web: Vec<String>,
pub clone: Vec<String>,
pub relays: Vec<RelayUrl>,
pub earliest_unique_commit: Option<String>,
pub maintainers: Vec<PublicKey>,
pub hashtags: Vec<String>,
pub personal_fork: bool,
}Expand description
Typed bundle for the kind: 30617 repository announcement.
Fields§
§identifier: Stringd tag — addressable identifier, usually kebab-case.
name: Option<String>Human-readable project name.
description: Option<String>Short project description.
web: Vec<String>Web URLs (homepage, browser-side git UI, …).
clone: Vec<String>git clone URLs.
relays: Vec<RelayUrl>Relays the author monitors for patches / issues.
earliest_unique_commit: Option<String>Earliest unique commit hex (r tag with euc marker).
maintainers: Vec<PublicKey>Maintainer pubkeys.
Hashtags labelling the repository.
personal_fork: boolTrue when the spec-reserved personal-fork hashtag is set.
Implementations§
Source§impl Repository
impl Repository
Sourcepub fn new(identifier: impl Into<String>) -> Self
pub fn new(identifier: impl Into<String>) -> Self
Construct an announcement bound to the addressable d
identifier.
Sourcepub fn coordinate(&self, author: PublicKey) -> Coordinate
pub fn coordinate(&self, author: PublicKey) -> Coordinate
Build the addressable coordinate for this announcement under
author.
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-30617 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 Repository
impl Clone for Repository
Source§fn clone(&self) -> Repository
fn clone(&self) -> Repository
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Repository
impl Debug for Repository
impl Eq for Repository
Source§impl PartialEq for Repository
impl PartialEq for Repository
impl StructuralPartialEq for Repository
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnsafeUnpin for Repository
impl UnwindSafe for Repository
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
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
key and return true if they are equal.