#[non_exhaustive]pub struct CreateOccurrenceRequest {
pub parent: String,
pub occurrence: Option<Occurrence>,
/* private fields */
}Expand description
Request to create a new occurrence.
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.parent: StringThe name of the project in the form of projects/[PROJECT_ID], under which
the occurrence is to be created.
occurrence: Option<Occurrence>The occurrence to create.
Implementations§
Source§impl CreateOccurrenceRequest
impl CreateOccurrenceRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_occurrence<T>(self, v: T) -> Selfwhere
T: Into<Occurrence>,
pub fn set_occurrence<T>(self, v: T) -> Selfwhere
T: Into<Occurrence>,
Sets the value of occurrence.
§Example
ⓘ
use google_cloud_grafeas_v1::model::Occurrence;
let x = CreateOccurrenceRequest::new().set_occurrence(Occurrence::default()/* use setters */);Sourcepub fn set_or_clear_occurrence<T>(self, v: Option<T>) -> Selfwhere
T: Into<Occurrence>,
pub fn set_or_clear_occurrence<T>(self, v: Option<T>) -> Selfwhere
T: Into<Occurrence>,
Sets or clears the value of occurrence.
§Example
ⓘ
use google_cloud_grafeas_v1::model::Occurrence;
let x = CreateOccurrenceRequest::new().set_or_clear_occurrence(Some(Occurrence::default()/* use setters */));
let x = CreateOccurrenceRequest::new().set_or_clear_occurrence(None::<Occurrence>);Trait Implementations§
Source§impl Clone for CreateOccurrenceRequest
impl Clone for CreateOccurrenceRequest
Source§fn clone(&self) -> CreateOccurrenceRequest
fn clone(&self) -> CreateOccurrenceRequest
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 CreateOccurrenceRequest
impl Debug for CreateOccurrenceRequest
Source§impl Default for CreateOccurrenceRequest
impl Default for CreateOccurrenceRequest
Source§fn default() -> CreateOccurrenceRequest
fn default() -> CreateOccurrenceRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateOccurrenceRequest
impl Message for CreateOccurrenceRequest
Source§impl PartialEq for CreateOccurrenceRequest
impl PartialEq for CreateOccurrenceRequest
impl StructuralPartialEq for CreateOccurrenceRequest
Auto Trait Implementations§
impl !Freeze for CreateOccurrenceRequest
impl RefUnwindSafe for CreateOccurrenceRequest
impl Send for CreateOccurrenceRequest
impl Sync for CreateOccurrenceRequest
impl Unpin for CreateOccurrenceRequest
impl UnsafeUnpin for CreateOccurrenceRequest
impl UnwindSafe for CreateOccurrenceRequest
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