pub struct PullRequestUpdate {
pub content: String,
pub repo: Coordinate,
pub repo_euc: Option<String>,
pub mentions: Vec<PublicKey>,
pub root_event: EventId,
pub root_pubkey: PublicKey,
pub tip_commit: Option<String>,
pub clone: Vec<String>,
pub merge_base: Option<String>,
}Expand description
Typed bundle for the kind: 1619 pull request update.
Fields§
§content: String.content — free-form description.
repo: CoordinateRepository pointer.
repo_euc: Option<String>Earliest-unique-commit hex of the target repo.
mentions: Vec<PublicKey>People to notify.
root_event: EventIdE (uppercase) — root PR event id (NIP-22).
root_pubkey: PublicKeyP (uppercase) — root PR author pubkey (NIP-22).
tip_commit: Option<String>c tag — updated tip commit.
clone: Vec<String>clone URLs.
merge_base: Option<String>merge-base tag.
Implementations§
Source§impl PullRequestUpdate
impl PullRequestUpdate
Sourcepub fn new(
repo: Coordinate,
root_event: EventId,
root_pubkey: PublicKey,
content: impl Into<String>,
) -> Self
pub fn new( repo: Coordinate, root_event: EventId, root_pubkey: PublicKey, content: impl Into<String>, ) -> Self
Construct a PR-update bundle.
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-1619 event into a typed bundle.
§Errors
Returns Nip34Error::WrongKind for the wrong kind,
Nip34Error::MissingRepository when the a tag is
absent, and forwards every parse error. The uppercase E
and P tags MUST both be present per NIP-22.
Trait Implementations§
Source§impl Clone for PullRequestUpdate
impl Clone for PullRequestUpdate
Source§fn clone(&self) -> PullRequestUpdate
fn clone(&self) -> PullRequestUpdate
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 PullRequestUpdate
impl Debug for PullRequestUpdate
impl Eq for PullRequestUpdate
Source§impl PartialEq for PullRequestUpdate
impl PartialEq for PullRequestUpdate
impl StructuralPartialEq for PullRequestUpdate
Auto Trait Implementations§
impl Freeze for PullRequestUpdate
impl RefUnwindSafe for PullRequestUpdate
impl Send for PullRequestUpdate
impl Sync for PullRequestUpdate
impl Unpin for PullRequestUpdate
impl UnsafeUnpin for PullRequestUpdate
impl UnwindSafe for PullRequestUpdate
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.