pub struct CommitOption {
pub notification_type: i32,
pub auto_dispose: bool,
}Expand description
options for commit request
Fields§
§notification_type: i32response will be returned after reaching the commit status.
auto_dispose: booldispose the target transaction handle if the success of commit is notified to the client.
Implementations§
Source§impl CommitOption
Commit option.
impl CommitOption
Commit option.
See SqlClient::commit().
§Examples
§Stored
use tsubakuro_rust_core::prelude::*;
let mut commit_option = CommitOption::new();
commit_option.set_commit_type(CommitType::Stored);use tsubakuro_rust_core::prelude::*;
let commit_option = CommitOption::from(CommitType::Stored);§Default
use tsubakuro_rust_core::prelude::*;
let mut commit_option = CommitOption::new();
commit_option.set_commit_type(CommitType::Unspecified);use tsubakuro_rust_core::prelude::*;
let commit_option = CommitOption::from(CommitType::Unspecified);use tsubakuro_rust_core::prelude::*;
let transaction_option = TransactionOption::default();Sourcepub fn new() -> CommitOption
pub fn new() -> CommitOption
Creates a new instance.
Sourcepub fn set_commit_type(&mut self, commit_type: CommitType)
pub fn set_commit_type(&mut self, commit_type: CommitType)
Set commit type.
Sourcepub fn commit_type(&self) -> CommitType
pub fn commit_type(&self) -> CommitType
Get commit type.
Sourcepub fn set_auto_dispose(&mut self, auto_dispose: bool)
pub fn set_auto_dispose(&mut self, auto_dispose: bool)
Set auto dispose.
Sourcepub fn auto_dispose(&self) -> bool
pub fn auto_dispose(&self) -> bool
Get auto dispose.
Source§impl CommitOption
impl CommitOption
Sourcepub fn notification_type(&self) -> CommitStatus
pub fn notification_type(&self) -> CommitStatus
Returns the enum value of notification_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_notification_type(&mut self, value: CommitStatus)
pub fn set_notification_type(&mut self, value: CommitStatus)
Sets notification_type to the provided enum value.
Trait Implementations§
Source§impl Clone for CommitOption
impl Clone for CommitOption
Source§fn clone(&self) -> CommitOption
fn clone(&self) -> CommitOption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommitOption
impl Debug for CommitOption
Source§impl Default for CommitOption
impl Default for CommitOption
Source§impl From<CommitStatus> for CommitOption
impl From<CommitStatus> for CommitOption
Source§fn from(value: CommitType) -> Self
fn from(value: CommitType) -> Self
Converts to this type from the input type.
Source§impl Message for CommitOption
impl Message for CommitOption
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for CommitOption
impl PartialEq for CommitOption
impl Copy for CommitOption
impl StructuralPartialEq for CommitOption
Auto Trait Implementations§
impl Freeze for CommitOption
impl RefUnwindSafe for CommitOption
impl Send for CommitOption
impl Sync for CommitOption
impl Unpin for CommitOption
impl UnwindSafe for CommitOption
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