Struct google_api_proto::google::cloud::contentwarehouse::v1::MergeFieldsOptions
source · pub struct MergeFieldsOptions {
pub replace_message_fields: Option<bool>,
pub replace_repeated_fields: Option<bool>,
}
Expand description
Options for merging updated fields.
Fields§
§replace_message_fields: Option<bool>
When merging message fields, the default behavior is to merge the content of two message fields together. If you instead want to use the field from the source message to replace the corresponding field in the destination message, set this flag to true. When this flag is set, specified submessage fields that are missing in source will be cleared in destination.
replace_repeated_fields: Option<bool>
When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field. If you instead want to keep only the entries from the source repeated field, set this flag to true.
If you want to replace a repeated field within a message field on the destination message, you must set both replace_repeated_fields and replace_message_fields to true, otherwise the repeated fields will be appended.
Implementations§
source§impl MergeFieldsOptions
impl MergeFieldsOptions
sourcepub fn replace_message_fields(&self) -> bool
pub fn replace_message_fields(&self) -> bool
Returns the value of replace_message_fields
, or the default value if replace_message_fields
is unset.
sourcepub fn replace_repeated_fields(&self) -> bool
pub fn replace_repeated_fields(&self) -> bool
Returns the value of replace_repeated_fields
, or the default value if replace_repeated_fields
is unset.
Trait Implementations§
source§impl Clone for MergeFieldsOptions
impl Clone for MergeFieldsOptions
source§fn clone(&self) -> MergeFieldsOptions
fn clone(&self) -> MergeFieldsOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MergeFieldsOptions
impl Debug for MergeFieldsOptions
source§impl Default for MergeFieldsOptions
impl Default for MergeFieldsOptions
source§impl Message for MergeFieldsOptions
impl Message for MergeFieldsOptions
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for MergeFieldsOptions
impl PartialEq for MergeFieldsOptions
source§fn eq(&self, other: &MergeFieldsOptions) -> bool
fn eq(&self, other: &MergeFieldsOptions) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for MergeFieldsOptions
impl StructuralPartialEq for MergeFieldsOptions
Auto Trait Implementations§
impl Freeze for MergeFieldsOptions
impl RefUnwindSafe for MergeFieldsOptions
impl Send for MergeFieldsOptions
impl Sync for MergeFieldsOptions
impl Unpin for MergeFieldsOptions
impl UnwindSafe for MergeFieldsOptions
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request