#[non_exhaustive]pub struct SpecificStartPosition {
pub position: Option<Position>,
/* private fields */
}Expand description
CDC strategy to start replicating from a specific position in the source.
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.position: Option<Position>Implementations§
Source§impl SpecificStartPosition
impl SpecificStartPosition
pub fn new() -> Self
Sourcepub fn set_position<T: Into<Option<Position>>>(self, v: T) -> Self
pub fn set_position<T: Into<Option<Position>>>(self, v: T) -> Self
Sets the value of position.
Note that all the setters affecting position are mutually
exclusive.
§Example
use google_cloud_datastream_v1::model::MysqlLogPosition;
let x = SpecificStartPosition::new().set_position(Some(
google_cloud_datastream_v1::model::cdc_strategy::specific_start_position::Position::MysqlLogPosition(MysqlLogPosition::default().into())));Sourcepub fn mysql_log_position(&self) -> Option<&Box<MysqlLogPosition>>
pub fn mysql_log_position(&self) -> Option<&Box<MysqlLogPosition>>
The value of position
if it holds a MysqlLogPosition, None if the field is not set or
holds a different branch.
Sourcepub fn set_mysql_log_position<T: Into<Box<MysqlLogPosition>>>(
self,
v: T,
) -> Self
pub fn set_mysql_log_position<T: Into<Box<MysqlLogPosition>>>( self, v: T, ) -> Self
Sets the value of position
to hold a MysqlLogPosition.
Note that all the setters affecting position are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::MysqlLogPosition;
let x = SpecificStartPosition::new().set_mysql_log_position(MysqlLogPosition::default()/* use setters */);
assert!(x.mysql_log_position().is_some());
assert!(x.oracle_scn_position().is_none());
assert!(x.sql_server_lsn_position().is_none());
assert!(x.mysql_gtid_position().is_none());Sourcepub fn oracle_scn_position(&self) -> Option<&Box<OracleScnPosition>>
pub fn oracle_scn_position(&self) -> Option<&Box<OracleScnPosition>>
The value of position
if it holds a OracleScnPosition, None if the field is not set or
holds a different branch.
Sourcepub fn set_oracle_scn_position<T: Into<Box<OracleScnPosition>>>(
self,
v: T,
) -> Self
pub fn set_oracle_scn_position<T: Into<Box<OracleScnPosition>>>( self, v: T, ) -> Self
Sets the value of position
to hold a OracleScnPosition.
Note that all the setters affecting position are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::OracleScnPosition;
let x = SpecificStartPosition::new().set_oracle_scn_position(OracleScnPosition::default()/* use setters */);
assert!(x.oracle_scn_position().is_some());
assert!(x.mysql_log_position().is_none());
assert!(x.sql_server_lsn_position().is_none());
assert!(x.mysql_gtid_position().is_none());Sourcepub fn sql_server_lsn_position(&self) -> Option<&Box<SqlServerLsnPosition>>
pub fn sql_server_lsn_position(&self) -> Option<&Box<SqlServerLsnPosition>>
The value of position
if it holds a SqlServerLsnPosition, None if the field is not set or
holds a different branch.
Sourcepub fn set_sql_server_lsn_position<T: Into<Box<SqlServerLsnPosition>>>(
self,
v: T,
) -> Self
pub fn set_sql_server_lsn_position<T: Into<Box<SqlServerLsnPosition>>>( self, v: T, ) -> Self
Sets the value of position
to hold a SqlServerLsnPosition.
Note that all the setters affecting position are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::SqlServerLsnPosition;
let x = SpecificStartPosition::new().set_sql_server_lsn_position(SqlServerLsnPosition::default()/* use setters */);
assert!(x.sql_server_lsn_position().is_some());
assert!(x.mysql_log_position().is_none());
assert!(x.oracle_scn_position().is_none());
assert!(x.mysql_gtid_position().is_none());Sourcepub fn mysql_gtid_position(&self) -> Option<&Box<MysqlGtidPosition>>
pub fn mysql_gtid_position(&self) -> Option<&Box<MysqlGtidPosition>>
The value of position
if it holds a MysqlGtidPosition, None if the field is not set or
holds a different branch.
Sourcepub fn set_mysql_gtid_position<T: Into<Box<MysqlGtidPosition>>>(
self,
v: T,
) -> Self
pub fn set_mysql_gtid_position<T: Into<Box<MysqlGtidPosition>>>( self, v: T, ) -> Self
Sets the value of position
to hold a MysqlGtidPosition.
Note that all the setters affecting position are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::MysqlGtidPosition;
let x = SpecificStartPosition::new().set_mysql_gtid_position(MysqlGtidPosition::default()/* use setters */);
assert!(x.mysql_gtid_position().is_some());
assert!(x.mysql_log_position().is_none());
assert!(x.oracle_scn_position().is_none());
assert!(x.sql_server_lsn_position().is_none());Trait Implementations§
Source§impl Clone for SpecificStartPosition
impl Clone for SpecificStartPosition
Source§fn clone(&self) -> SpecificStartPosition
fn clone(&self) -> SpecificStartPosition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more