pub struct ComRegisterSlave<'a> { /* private fields */ }Expand description
Registers a slave at the master. Should be sent before requesting a binlog events
with COM_BINLOG_DUMP.
Implementations§
Source§impl<'a> ComRegisterSlave<'a>
impl<'a> ComRegisterSlave<'a>
Sourcepub fn new(server_id: u32) -> Self
pub fn new(server_id: u32) -> Self
Creates new ComRegisterSlave with the given server identifier. Other fields will be empty.
Sourcepub fn with_hostname(self, hostname: impl Into<Cow<'a, [u8]>>) -> Self
pub fn with_hostname(self, hostname: impl Into<Cow<'a, [u8]>>) -> Self
Sets the hostname field of the packet (maximum length is 255 bytes).
Sourcepub fn with_user(self, user: impl Into<Cow<'a, [u8]>>) -> Self
pub fn with_user(self, user: impl Into<Cow<'a, [u8]>>) -> Self
Sets the user field of the packet (maximum length is 255 bytes).
Sourcepub fn with_password(self, password: impl Into<Cow<'a, [u8]>>) -> Self
pub fn with_password(self, password: impl Into<Cow<'a, [u8]>>) -> Self
Sets the password field of the packet (maximum length is 255 bytes).
Sourcepub fn with_replication_rank(self, replication_rank: u32) -> Self
pub fn with_replication_rank(self, replication_rank: u32) -> Self
Sets the replication_rank field of the packet.
Sourcepub fn with_master_id(self, master_id: u32) -> Self
pub fn with_master_id(self, master_id: u32) -> Self
Sets the master_id field of the packet.
Sourcepub fn hostname_raw(&self) -> &[u8] ⓘ
pub fn hostname_raw(&self) -> &[u8] ⓘ
Returns the raw hostname field value.
Sourcepub fn hostname(&'a self) -> Cow<'a, str>
pub fn hostname(&'a self) -> Cow<'a, str>
Returns the hostname field as a UTF-8 string (lossy converted).
Sourcepub fn user(&'a self) -> Cow<'a, str>
pub fn user(&'a self) -> Cow<'a, str>
Returns the user field as a UTF-8 string (lossy converted).
Sourcepub fn password_raw(&self) -> &[u8] ⓘ
pub fn password_raw(&self) -> &[u8] ⓘ
Returns the raw password field value.
Sourcepub fn password(&'a self) -> Cow<'a, str>
pub fn password(&'a self) -> Cow<'a, str>
Returns the password field as a UTF-8 string (lossy converted).
Sourcepub fn replication_rank(&self) -> u32
pub fn replication_rank(&self) -> u32
Returns the replication_rank field of the packet.
Trait Implementations§
Source§impl<'a> Clone for ComRegisterSlave<'a>
impl<'a> Clone for ComRegisterSlave<'a>
Source§fn clone(&self) -> ComRegisterSlave<'a>
fn clone(&self) -> ComRegisterSlave<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more