pub struct AppliedSourceRequirements { /* private fields */ }Expand description
Requirements applied to one exact source-code subject and their answers.
The subject is the target repository and branch at exactly the stated base
and head revisions. A provider must not substitute a newer branch tip or
head revision. required_approvals is the strongest applicable minimum;
required_checks contains exactly one answer for every applicable native
check requirement, in stable provider-defined order. No two entries
have the same name and provider-application identity.
A later read may return a different subject or different answers. This value is evidence about the revisions it names, not a subscription to branch state.
Implementations§
Source§impl AppliedSourceRequirements
impl AppliedSourceRequirements
pub fn new( repository: Repository, target_branch: impl Into<String>, commit_range: CommitRange, required_approvals: u32, branch_update: BranchUpdateRequirement, required_checks: Vec<AppliedRequiredCheck>, ) -> Result<Self, ModelError>
pub const fn repository(&self) -> &Repository
pub fn target_branch(&self) -> &str
pub const fn commit_range(&self) -> &CommitRange
pub const fn required_approvals(&self) -> u32
pub const fn branch_update(&self) -> BranchUpdateRequirement
pub fn required_checks(&self) -> &[AppliedRequiredCheck]
Trait Implementations§
Source§impl Clone for AppliedSourceRequirements
impl Clone for AppliedSourceRequirements
Source§fn clone(&self) -> AppliedSourceRequirements
fn clone(&self) -> AppliedSourceRequirements
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 AppliedSourceRequirements
impl Debug for AppliedSourceRequirements
Source§impl<'de> Deserialize<'de> for AppliedSourceRequirements
impl<'de> Deserialize<'de> for AppliedSourceRequirements
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 AppliedSourceRequirements
impl StructuralPartialEq for AppliedSourceRequirements
Auto Trait Implementations§
impl Freeze for AppliedSourceRequirements
impl RefUnwindSafe for AppliedSourceRequirements
impl Send for AppliedSourceRequirements
impl Sync for AppliedSourceRequirements
impl Unpin for AppliedSourceRequirements
impl UnsafeUnpin for AppliedSourceRequirements
impl UnwindSafe for AppliedSourceRequirements
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