#[non_exhaustive]pub struct StyleGuide {
pub name: String,
pub linter: Linter,
pub contents: Option<StyleGuideContents>,
/* private fields */
}Expand description
Represents a singleton style guide resource to be used for linting Open API specs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. The name of the style guide.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
linter: LinterRequired. Target linter for the style guide.
contents: Option<StyleGuideContents>Required. Input only. The contents of the uploaded style guide.
Implementations§
Source§impl StyleGuide
impl StyleGuide
pub fn new() -> Self
Sourcepub fn set_linter<T: Into<Linter>>(self, v: T) -> Self
pub fn set_linter<T: Into<Linter>>(self, v: T) -> Self
Sourcepub fn set_contents<T>(self, v: T) -> Selfwhere
T: Into<StyleGuideContents>,
pub fn set_contents<T>(self, v: T) -> Selfwhere
T: Into<StyleGuideContents>,
Sourcepub fn set_or_clear_contents<T>(self, v: Option<T>) -> Selfwhere
T: Into<StyleGuideContents>,
pub fn set_or_clear_contents<T>(self, v: Option<T>) -> Selfwhere
T: Into<StyleGuideContents>,
Trait Implementations§
Source§impl Clone for StyleGuide
impl Clone for StyleGuide
Source§fn clone(&self) -> StyleGuide
fn clone(&self) -> StyleGuide
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 StyleGuide
impl Debug for StyleGuide
Source§impl Default for StyleGuide
impl Default for StyleGuide
Source§fn default() -> StyleGuide
fn default() -> StyleGuide
Returns the “default value” for a type. Read more
Source§impl PartialEq for StyleGuide
impl PartialEq for StyleGuide
impl StructuralPartialEq for StyleGuide
Auto Trait Implementations§
impl !Freeze for StyleGuide
impl RefUnwindSafe for StyleGuide
impl Send for StyleGuide
impl Sync for StyleGuide
impl Unpin for StyleGuide
impl UnsafeUnpin for StyleGuide
impl UnwindSafe for StyleGuide
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