pub struct RepositoryRuleset {Show 14 fields
pub id: i32,
pub name: String,
pub target: Option<Target>,
pub source_type: Option<SourceType>,
pub source: String,
pub enforcement: RepositoryRuleEnforcement,
pub bypass_actors: Option<Vec<RepositoryRulesetBypassActor>>,
pub current_user_can_bypass: Option<CurrentUserCanBypass>,
pub node_id: Option<String>,
pub _links: Option<Box<RepositoryRulesetLinks>>,
pub conditions: Option<Option<Box<RepositoryRulesetConditions>>>,
pub rules: Option<Vec<RepositoryRule>>,
pub created_at: Option<String>,
pub updated_at: Option<String>,
}
Expand description
RepositoryRuleset : A set of rules to apply when specified conditions are met.
Fields§
§id: i32
The ID of the ruleset
name: String
The name of the ruleset
target: Option<Target>
The target of the ruleset Note: The push
target is in beta and is subject to change.
source_type: Option<SourceType>
The type of the source of the ruleset
source: String
The name of the source
enforcement: RepositoryRuleEnforcement
§bypass_actors: Option<Vec<RepositoryRulesetBypassActor>>
The actors that can bypass the rules in this ruleset
current_user_can_bypass: Option<CurrentUserCanBypass>
The bypass type of the user making the API request for this ruleset. This field is only returned when querying the repository-level endpoint.
node_id: Option<String>
§_links: Option<Box<RepositoryRulesetLinks>>
§conditions: Option<Option<Box<RepositoryRulesetConditions>>>
§rules: Option<Vec<RepositoryRule>>
§created_at: Option<String>
§updated_at: Option<String>
Implementations§
Source§impl RepositoryRuleset
impl RepositoryRuleset
Sourcepub fn new(
id: i32,
name: String,
source: String,
enforcement: RepositoryRuleEnforcement,
) -> RepositoryRuleset
pub fn new( id: i32, name: String, source: String, enforcement: RepositoryRuleEnforcement, ) -> RepositoryRuleset
A set of rules to apply when specified conditions are met.
Trait Implementations§
Source§impl Clone for RepositoryRuleset
impl Clone for RepositoryRuleset
Source§fn clone(&self) -> RepositoryRuleset
fn clone(&self) -> RepositoryRuleset
Returns a duplicate of the value. Read more
1.0.0 · 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 RepositoryRuleset
impl Debug for RepositoryRuleset
Source§impl Default for RepositoryRuleset
impl Default for RepositoryRuleset
Source§fn default() -> RepositoryRuleset
fn default() -> RepositoryRuleset
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RepositoryRuleset
impl<'de> Deserialize<'de> for RepositoryRuleset
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
Source§impl PartialEq for RepositoryRuleset
impl PartialEq for RepositoryRuleset
Source§impl Serialize for RepositoryRuleset
impl Serialize for RepositoryRuleset
impl StructuralPartialEq for RepositoryRuleset
Auto Trait Implementations§
impl Freeze for RepositoryRuleset
impl RefUnwindSafe for RepositoryRuleset
impl Send for RepositoryRuleset
impl Sync for RepositoryRuleset
impl Unpin for RepositoryRuleset
impl UnwindSafe for RepositoryRuleset
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