#[non_exhaustive]pub struct DocumentationRule {
pub selector: String,
pub description: String,
pub deprecation_description: String,
/* private fields */
}
Expand description
A documentation rule provides information about individual API elements.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.selector: String
The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in “”, indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. “foo.” is ok, but not “foo.b*” or “foo..bar”. A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern “” is used.
description: String
Description of the selected proto element (e.g. a message, a method, a ‘service’ definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.
deprecation_description: String
Deprecation description of the selected element(s). It can be provided if
an element is marked as deprecated
.
Implementations§
Source§impl DocumentationRule
impl DocumentationRule
pub fn new() -> Self
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_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_deprecation_description<T: Into<String>>(self, v: T) -> Self
pub fn set_deprecation_description<T: Into<String>>(self, v: T) -> Self
Sets the value of deprecation_description.
Trait Implementations§
Source§impl Clone for DocumentationRule
impl Clone for DocumentationRule
Source§fn clone(&self) -> DocumentationRule
fn clone(&self) -> DocumentationRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more