#[non_exhaustive]pub struct MethodOptions {
pub deprecated: bool,
pub idempotency_level: IdempotencyLevel,
pub features: Option<FeatureSet>,
pub uninterpreted_option: Vec<UninterpretedOption>,
/* private fields */
}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.deprecated: boolIs this method deprecated? Depending on the target platform, this can emit Deprecated annotations for the method, or it will be completely ignored; in the very least, this is a formalization for deprecating methods.
idempotency_level: IdempotencyLevel§features: Option<FeatureSet>Any features defined in the specific edition.
uninterpreted_option: Vec<UninterpretedOption>The parser stores options it doesn’t recognize here. See above.
Implementations§
Source§impl MethodOptions
impl MethodOptions
pub fn new() -> Self
Sourcepub fn set_deprecated<T: Into<bool>>(self, v: T) -> Self
pub fn set_deprecated<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_idempotency_level<T: Into<IdempotencyLevel>>(self, v: T) -> Self
pub fn set_idempotency_level<T: Into<IdempotencyLevel>>(self, v: T) -> Self
Sets the value of idempotency_level.
§Example
ⓘ
use google_cloud_wkt::method_options::IdempotencyLevel;
let x0 = MethodOptions::new().set_idempotency_level(IdempotencyLevel::NoSideEffects);
let x1 = MethodOptions::new().set_idempotency_level(IdempotencyLevel::Idempotent);Sourcepub fn set_features<T>(self, v: T) -> Selfwhere
T: Into<FeatureSet>,
pub fn set_features<T>(self, v: T) -> Selfwhere
T: Into<FeatureSet>,
Sourcepub fn set_or_clear_features<T>(self, v: Option<T>) -> Selfwhere
T: Into<FeatureSet>,
pub fn set_or_clear_features<T>(self, v: Option<T>) -> Selfwhere
T: Into<FeatureSet>,
Sourcepub fn set_uninterpreted_option<T, V>(self, v: T) -> Self
pub fn set_uninterpreted_option<T, V>(self, v: T) -> Self
Sets the value of uninterpreted_option.
§Example
ⓘ
use google_cloud_wkt::UninterpretedOption;
let x = MethodOptions::new()
.set_uninterpreted_option([
UninterpretedOption::default()/* use setters */,
UninterpretedOption::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for MethodOptions
impl Clone for MethodOptions
Source§fn clone(&self) -> MethodOptions
fn clone(&self) -> MethodOptions
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 MethodOptions
impl Debug for MethodOptions
Source§impl Default for MethodOptions
impl Default for MethodOptions
Source§fn default() -> MethodOptions
fn default() -> MethodOptions
Returns the “default value” for a type. Read more
Source§impl Message for MethodOptions
impl Message for MethodOptions
Source§impl PartialEq for MethodOptions
impl PartialEq for MethodOptions
impl StructuralPartialEq for MethodOptions
Auto Trait Implementations§
impl Freeze for MethodOptions
impl RefUnwindSafe for MethodOptions
impl Send for MethodOptions
impl Sync for MethodOptions
impl Unpin for MethodOptions
impl UnwindSafe for MethodOptions
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