pub struct PullRequest {
pub content: String,
pub repo: Coordinate,
pub repo_euc: Option<String>,
pub mentions: Vec<PublicKey>,
pub subject: Option<String>,
pub hashtags: Vec<String>,
pub tip_commit: Option<String>,
pub clone: Vec<String>,
pub branch_name: Option<String>,
pub revises_event: Option<EventId>,
pub merge_base: Option<String>,
}Expand description
Typed bundle for the kind: 1618 pull request event.
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.
subject: Option<String>subject tag.
Hashtags.
tip_commit: Option<String>c tag — tip of the PR branch.
clone: Vec<String>clone URLs where the commit can be downloaded.
branch_name: Option<String>Optional recommended branch name.
revises_event: Option<EventId>Optional e tag — existing PR/patch being revised.
merge_base: Option<String>merge-base tag — most recent common ancestor with the
target branch.
Implementations§
Source§impl PullRequest
impl PullRequest
Sourcepub fn new(repo: Coordinate, content: impl Into<String>) -> Self
pub fn new(repo: Coordinate, content: impl Into<String>) -> Self
Construct a pull request 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-1618 event into a typed bundle.
§Errors
Returns Nip34Error::WrongKind for the wrong kind and
Nip34Error::MissingRepository when the a tag is
absent; forwards every parse error.
Trait Implementations§
Source§impl Clone for PullRequest
impl Clone for PullRequest
Source§fn clone(&self) -> PullRequest
fn clone(&self) -> PullRequest
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 PullRequest
impl Debug for PullRequest
impl Eq for PullRequest
Source§impl PartialEq for PullRequest
impl PartialEq for PullRequest
impl StructuralPartialEq for PullRequest
Auto Trait Implementations§
impl Freeze for PullRequest
impl RefUnwindSafe for PullRequest
impl Send for PullRequest
impl Sync for PullRequest
impl Unpin for PullRequest
impl UnsafeUnpin for PullRequest
impl UnwindSafe for PullRequest
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.