pub struct EnvChange {
pub env_type: EnvChangeType,
pub new_value: EnvChangeValue,
pub old_value: EnvChangeValue,
}Expand description
Environment change token.
Fields§
§env_type: EnvChangeTypeType of environment change.
new_value: EnvChangeValueNew value.
old_value: EnvChangeValueOld value.
Implementations§
Source§impl EnvChange
impl EnvChange
Sourcepub fn decode(src: &mut impl Buf) -> Result<Self, ProtocolError>
pub fn decode(src: &mut impl Buf) -> Result<Self, ProtocolError>
Decode an ENVCHANGE token from bytes.
Sourcepub fn is_routing(&self) -> bool
pub fn is_routing(&self) -> bool
Check if this is a routing redirect.
Sourcepub fn routing_info(&self) -> Option<(&str, u16)>
pub fn routing_info(&self) -> Option<(&str, u16)>
Get routing information if this is a routing change.
Sourcepub fn new_database(&self) -> Option<&str>
pub fn new_database(&self) -> Option<&str>
Get the new database name if this is a database change.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EnvChange
impl RefUnwindSafe for EnvChange
impl Send for EnvChange
impl Sync for EnvChange
impl Unpin for EnvChange
impl UnwindSafe for EnvChange
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