pub struct GithubRuleset {
pub id: Option<u64>,
pub name: String,
pub target: Option<String>,
pub source_type: Option<String>,
pub source: Option<String>,
pub enforcement: String,
pub bypass_actors: Option<Vec<GithubRulesetBypassActor>>,
pub conditions: Option<GithubRulesetConditions>,
pub rules: Option<Vec<GithubRulesetRule>>,
pub additional: BTreeMap<String, Value>,
}Expand description
One GitHub repository ruleset, including read-only source identity and every writable configuration field.
Optional fields remain absent rather than acquiring GitHub’s documented
defaults. additional retains response fields added by GitHub. Rule
parameters and unrecognized rule forms are retained by GithubRulesetRule
without provider-neutral normalization. Applying a value rejects unknown
writable forms instead of omitting them from the GitHub request.
Fields§
§id: Option<u64>§name: String§target: Option<String>§source_type: Option<String>§source: Option<String>§enforcement: String§bypass_actors: Option<Vec<GithubRulesetBypassActor>>§conditions: Option<GithubRulesetConditions>§rules: Option<Vec<GithubRulesetRule>>§additional: BTreeMap<String, Value>Implementations§
Source§impl GithubRuleset
impl GithubRuleset
Sourcepub fn validate(&self) -> Result<(), ModelError>
pub fn validate(&self) -> Result<(), ModelError>
Checks local invariants without interpreting unknown GitHub values.
This rejects empty identities and zero numeric identifiers. It does not replace provider validation of whether a retained rule, target, or parameter is writable in the repository that receives it.
Trait Implementations§
Source§impl Clone for GithubRuleset
impl Clone for GithubRuleset
Source§impl Debug for GithubRuleset
impl Debug for GithubRuleset
Source§impl<'de> Deserialize<'de> for GithubRuleset
impl<'de> Deserialize<'de> for GithubRuleset
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 GithubRuleset
impl PartialEq for GithubRuleset
Source§impl Serialize for GithubRuleset
impl Serialize for GithubRuleset
impl StructuralPartialEq for GithubRuleset
Auto Trait Implementations§
impl Freeze for GithubRuleset
impl RefUnwindSafe for GithubRuleset
impl Send for GithubRuleset
impl Sync for GithubRuleset
impl Unpin for GithubRuleset
impl UnsafeUnpin for GithubRuleset
impl UnwindSafe for GithubRuleset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FromResponse for Twhere
T: DeserializeOwned,
impl<T> FromResponse for Twhere
T: DeserializeOwned,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more