#[non_exhaustive]pub struct GeneratedCodeInfo {
pub annotation: Vec<Annotation>,
/* private fields */
}Expand description
Describes the relationship between generated code and its original source file. A GeneratedCodeInfo message is associated with only one generated source file, but may contain references to different source .proto files.
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.annotation: Vec<Annotation>An Annotation connects some span of text in generated code to an element of its generating .proto file.
Implementations§
Source§impl GeneratedCodeInfo
impl GeneratedCodeInfo
pub fn new() -> Self
Sourcepub fn set_annotation<T, V>(self, v: T) -> Self
pub fn set_annotation<T, V>(self, v: T) -> Self
Sets the value of annotation.
§Example
ⓘ
use google_cloud_wkt::generated_code_info::Annotation;
let x = GeneratedCodeInfo::new()
.set_annotation([
Annotation::default()/* use setters */,
Annotation::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for GeneratedCodeInfo
impl Clone for GeneratedCodeInfo
Source§fn clone(&self) -> GeneratedCodeInfo
fn clone(&self) -> GeneratedCodeInfo
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 GeneratedCodeInfo
impl Debug for GeneratedCodeInfo
Source§impl Default for GeneratedCodeInfo
impl Default for GeneratedCodeInfo
Source§fn default() -> GeneratedCodeInfo
fn default() -> GeneratedCodeInfo
Returns the “default value” for a type. Read more
Source§impl Message for GeneratedCodeInfo
impl Message for GeneratedCodeInfo
Source§impl PartialEq for GeneratedCodeInfo
impl PartialEq for GeneratedCodeInfo
impl StructuralPartialEq for GeneratedCodeInfo
Auto Trait Implementations§
impl Freeze for GeneratedCodeInfo
impl RefUnwindSafe for GeneratedCodeInfo
impl Send for GeneratedCodeInfo
impl Sync for GeneratedCodeInfo
impl Unpin for GeneratedCodeInfo
impl UnwindSafe for GeneratedCodeInfo
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