#[non_exhaustive]pub struct ChangeStreamRecord {
pub record: Option<Record>,
/* private fields */
}Expand description
Spanner Change Streams enable customers to capture and stream out changes to their Spanner databases in real-time. A change stream can be created with option partition_mode=‘IMMUTABLE_KEY_RANGE’ or partition_mode=‘MUTABLE_KEY_RANGE’.
This message is only used in Change Streams created with the option partition_mode=‘MUTABLE_KEY_RANGE’. Spanner automatically creates a special Table-Valued Function (TVF) along with each Change Streams. The function provides access to the change stream’s records. The function is named READ_<change_stream_name> (where <change_stream_name> is the name of the change stream), and it returns a table with only one column called ChangeRecord.
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.record: Option<Record>One of the change stream subrecords.
Implementations§
Source§impl ChangeStreamRecord
impl ChangeStreamRecord
Sourcepub fn set_record<T: Into<Option<Record>>>(self, v: T) -> Self
pub fn set_record<T: Into<Option<Record>>>(self, v: T) -> Self
Sets the value of record.
Note that all the setters affecting record are mutually
exclusive.
Sourcepub fn data_change_record(&self) -> Option<&Box<DataChangeRecord>>
pub fn data_change_record(&self) -> Option<&Box<DataChangeRecord>>
The value of record
if it holds a DataChangeRecord, None if the field is not set or
holds a different branch.
Sourcepub fn set_data_change_record<T: Into<Box<DataChangeRecord>>>(
self,
v: T,
) -> Self
pub fn set_data_change_record<T: Into<Box<DataChangeRecord>>>( self, v: T, ) -> Self
Sets the value of record
to hold a DataChangeRecord.
Note that all the setters affecting record are
mutually exclusive.
Sourcepub fn heartbeat_record(&self) -> Option<&Box<HeartbeatRecord>>
pub fn heartbeat_record(&self) -> Option<&Box<HeartbeatRecord>>
The value of record
if it holds a HeartbeatRecord, None if the field is not set or
holds a different branch.
Sourcepub fn set_heartbeat_record<T: Into<Box<HeartbeatRecord>>>(self, v: T) -> Self
pub fn set_heartbeat_record<T: Into<Box<HeartbeatRecord>>>(self, v: T) -> Self
Sets the value of record
to hold a HeartbeatRecord.
Note that all the setters affecting record are
mutually exclusive.
Sourcepub fn partition_start_record(&self) -> Option<&Box<PartitionStartRecord>>
pub fn partition_start_record(&self) -> Option<&Box<PartitionStartRecord>>
The value of record
if it holds a PartitionStartRecord, None if the field is not set or
holds a different branch.
Sourcepub fn set_partition_start_record<T: Into<Box<PartitionStartRecord>>>(
self,
v: T,
) -> Self
pub fn set_partition_start_record<T: Into<Box<PartitionStartRecord>>>( self, v: T, ) -> Self
Sets the value of record
to hold a PartitionStartRecord.
Note that all the setters affecting record are
mutually exclusive.
Sourcepub fn partition_end_record(&self) -> Option<&Box<PartitionEndRecord>>
pub fn partition_end_record(&self) -> Option<&Box<PartitionEndRecord>>
The value of record
if it holds a PartitionEndRecord, None if the field is not set or
holds a different branch.
Sourcepub fn set_partition_end_record<T: Into<Box<PartitionEndRecord>>>(
self,
v: T,
) -> Self
pub fn set_partition_end_record<T: Into<Box<PartitionEndRecord>>>( self, v: T, ) -> Self
Sets the value of record
to hold a PartitionEndRecord.
Note that all the setters affecting record are
mutually exclusive.
Sourcepub fn partition_event_record(&self) -> Option<&Box<PartitionEventRecord>>
pub fn partition_event_record(&self) -> Option<&Box<PartitionEventRecord>>
The value of record
if it holds a PartitionEventRecord, None if the field is not set or
holds a different branch.
Sourcepub fn set_partition_event_record<T: Into<Box<PartitionEventRecord>>>(
self,
v: T,
) -> Self
pub fn set_partition_event_record<T: Into<Box<PartitionEventRecord>>>( self, v: T, ) -> Self
Sets the value of record
to hold a PartitionEventRecord.
Note that all the setters affecting record are
mutually exclusive.
Trait Implementations§
Source§impl Clone for ChangeStreamRecord
impl Clone for ChangeStreamRecord
Source§fn clone(&self) -> ChangeStreamRecord
fn clone(&self) -> ChangeStreamRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChangeStreamRecord
impl Debug for ChangeStreamRecord
Source§impl Default for ChangeStreamRecord
impl Default for ChangeStreamRecord
Source§fn default() -> ChangeStreamRecord
fn default() -> ChangeStreamRecord
Source§impl Message for ChangeStreamRecord
impl Message for ChangeStreamRecord
Source§impl PartialEq for ChangeStreamRecord
impl PartialEq for ChangeStreamRecord
Source§fn eq(&self, other: &ChangeStreamRecord) -> bool
fn eq(&self, other: &ChangeStreamRecord) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChangeStreamRecord
Auto Trait Implementations§
impl Freeze for ChangeStreamRecord
impl RefUnwindSafe for ChangeStreamRecord
impl Send for ChangeStreamRecord
impl Sync for ChangeStreamRecord
impl Unpin for ChangeStreamRecord
impl UnsafeUnpin for ChangeStreamRecord
impl UnwindSafe for ChangeStreamRecord
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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