#[non_exhaustive]pub struct VisibilityRule {
    pub selector: String,
    pub restriction: String,
}Expand description
A visibility rule provides visibility configuration for an individual API element.
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.selector: StringSelects methods, messages, fields, enums, etc. to which this rule applies.
Refer to selector for syntax details.
restriction: StringA comma-separated list of visibility labels that apply to the selector.
Any of the listed labels can be used to grant the visibility.
If a rule has multiple labels, removing one of the labels but not all of them can break clients.
Example:
visibility:
  rules:
  - selector: google.calendar.Calendar.EnhancedSearch
    restriction: INTERNAL, PREVIEWRemoving INTERNAL from this restriction will break clients that rely on this method and only had access to it through INTERNAL.
Implementations§
Source§impl VisibilityRule
 
impl VisibilityRule
Sourcepub fn set_selector<T: Into<String>>(self, v: T) -> Self
 
pub fn set_selector<T: Into<String>>(self, v: T) -> Self
Sets the value of selector.
Sourcepub fn set_restriction<T: Into<String>>(self, v: T) -> Self
 
pub fn set_restriction<T: Into<String>>(self, v: T) -> Self
Sets the value of restriction.
Trait Implementations§
Source§impl Clone for VisibilityRule
 
impl Clone for VisibilityRule
Source§fn clone(&self) -> VisibilityRule
 
fn clone(&self) -> VisibilityRule
Returns a copy 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 VisibilityRule
 
impl Debug for VisibilityRule
Source§impl Default for VisibilityRule
 
impl Default for VisibilityRule
Source§fn default() -> VisibilityRule
 
fn default() -> VisibilityRule
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VisibilityRulewhere
    VisibilityRule: Default,
 
impl<'de> Deserialize<'de> for VisibilityRulewhere
    VisibilityRule: Default,
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 Message for VisibilityRule
 
impl Message for VisibilityRule
Source§impl PartialEq for VisibilityRule
 
impl PartialEq for VisibilityRule
Source§impl Serialize for VisibilityRule
 
impl Serialize for VisibilityRule
impl StructuralPartialEq for VisibilityRule
Auto Trait Implementations§
impl Freeze for VisibilityRule
impl RefUnwindSafe for VisibilityRule
impl Send for VisibilityRule
impl Sync for VisibilityRule
impl Unpin for VisibilityRule
impl UnwindSafe for VisibilityRule
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