Struct BaseCommand

Source
pub struct BaseCommand {
Show 54 fields pub type: i32, pub connect: Option<CommandConnect>, pub connected: Option<CommandConnected>, pub subscribe: Option<CommandSubscribe>, pub producer: Option<CommandProducer>, pub send: Option<CommandSend>, pub send_receipt: Option<CommandSendReceipt>, pub send_error: Option<CommandSendError>, pub message: Option<CommandMessage>, pub ack: Option<CommandAck>, pub flow: Option<CommandFlow>, pub unsubscribe: Option<CommandUnsubscribe>, pub success: Option<CommandSuccess>, pub error: Option<CommandError>, pub close_producer: Option<CommandCloseProducer>, pub close_consumer: Option<CommandCloseConsumer>, pub producer_success: Option<CommandProducerSuccess>, pub ping: Option<CommandPing>, pub pong: Option<CommandPong>, pub redeliver_unacknowledged_messages: Option<CommandRedeliverUnacknowledgedMessages>, pub partition_metadata: Option<CommandPartitionedTopicMetadata>, pub partition_metadata_response: Option<CommandPartitionedTopicMetadataResponse>, pub lookup_topic: Option<CommandLookupTopic>, pub lookup_topic_response: Option<CommandLookupTopicResponse>, pub consumer_stats: Option<CommandConsumerStats>, pub consumer_stats_response: Option<CommandConsumerStatsResponse>, pub reached_end_of_topic: Option<CommandReachedEndOfTopic>, pub seek: Option<CommandSeek>, pub get_last_message_id: Option<CommandGetLastMessageId>, pub get_last_message_id_response: Option<CommandGetLastMessageIdResponse>, pub active_consumer_change: Option<CommandActiveConsumerChange>, pub get_topics_of_namespace: Option<CommandGetTopicsOfNamespace>, pub get_topics_of_namespace_response: Option<CommandGetTopicsOfNamespaceResponse>, pub get_schema: Option<CommandGetSchema>, pub get_schema_response: Option<CommandGetSchemaResponse>, pub auth_challenge: Option<CommandAuthChallenge>, pub auth_response: Option<CommandAuthResponse>, pub ack_response: Option<CommandAckResponse>, pub get_or_create_schema: Option<CommandGetOrCreateSchema>, pub get_or_create_schema_response: Option<CommandGetOrCreateSchemaResponse>, pub new_txn: Option<CommandNewTxn>, pub new_txn_response: Option<CommandNewTxnResponse>, pub add_partition_to_txn: Option<CommandAddPartitionToTxn>, pub add_partition_to_txn_response: Option<CommandAddPartitionToTxnResponse>, pub add_subscription_to_txn: Option<CommandAddSubscriptionToTxn>, pub add_subscription_to_txn_response: Option<CommandAddSubscriptionToTxnResponse>, pub end_txn: Option<CommandEndTxn>, pub end_txn_response: Option<CommandEndTxnResponse>, pub end_txn_on_partition: Option<CommandEndTxnOnPartition>, pub end_txn_on_partition_response: Option<CommandEndTxnOnPartitionResponse>, pub end_txn_on_subscription: Option<CommandEndTxnOnSubscription>, pub end_txn_on_subscription_response: Option<CommandEndTxnOnSubscriptionResponse>, pub tc_client_connect_request: Option<CommandTcClientConnectRequest>, pub tc_client_connect_response: Option<CommandTcClientConnectResponse>,
}

Fields§

§type: i32§connect: Option<CommandConnect>§connected: Option<CommandConnected>§subscribe: Option<CommandSubscribe>§producer: Option<CommandProducer>§send: Option<CommandSend>§send_receipt: Option<CommandSendReceipt>§send_error: Option<CommandSendError>§message: Option<CommandMessage>§ack: Option<CommandAck>§flow: Option<CommandFlow>§unsubscribe: Option<CommandUnsubscribe>§success: Option<CommandSuccess>§error: Option<CommandError>§close_producer: Option<CommandCloseProducer>§close_consumer: Option<CommandCloseConsumer>§producer_success: Option<CommandProducerSuccess>§ping: Option<CommandPing>§pong: Option<CommandPong>§redeliver_unacknowledged_messages: Option<CommandRedeliverUnacknowledgedMessages>§partition_metadata: Option<CommandPartitionedTopicMetadata>§partition_metadata_response: Option<CommandPartitionedTopicMetadataResponse>§lookup_topic: Option<CommandLookupTopic>§lookup_topic_response: Option<CommandLookupTopicResponse>§consumer_stats: Option<CommandConsumerStats>§consumer_stats_response: Option<CommandConsumerStatsResponse>§reached_end_of_topic: Option<CommandReachedEndOfTopic>§seek: Option<CommandSeek>§get_last_message_id: Option<CommandGetLastMessageId>§get_last_message_id_response: Option<CommandGetLastMessageIdResponse>§active_consumer_change: Option<CommandActiveConsumerChange>§get_topics_of_namespace: Option<CommandGetTopicsOfNamespace>§get_topics_of_namespace_response: Option<CommandGetTopicsOfNamespaceResponse>§get_schema: Option<CommandGetSchema>§get_schema_response: Option<CommandGetSchemaResponse>§auth_challenge: Option<CommandAuthChallenge>§auth_response: Option<CommandAuthResponse>§ack_response: Option<CommandAckResponse>§get_or_create_schema: Option<CommandGetOrCreateSchema>§get_or_create_schema_response: Option<CommandGetOrCreateSchemaResponse>§new_txn: Option<CommandNewTxn>

transaction related

§new_txn_response: Option<CommandNewTxnResponse>§add_partition_to_txn: Option<CommandAddPartitionToTxn>§add_partition_to_txn_response: Option<CommandAddPartitionToTxnResponse>§add_subscription_to_txn: Option<CommandAddSubscriptionToTxn>§add_subscription_to_txn_response: Option<CommandAddSubscriptionToTxnResponse>§end_txn: Option<CommandEndTxn>§end_txn_response: Option<CommandEndTxnResponse>§end_txn_on_partition: Option<CommandEndTxnOnPartition>§end_txn_on_partition_response: Option<CommandEndTxnOnPartitionResponse>§end_txn_on_subscription: Option<CommandEndTxnOnSubscription>§end_txn_on_subscription_response: Option<CommandEndTxnOnSubscriptionResponse>§tc_client_connect_request: Option<CommandTcClientConnectRequest>§tc_client_connect_response: Option<CommandTcClientConnectResponse>

Implementations§

Source§

impl BaseCommand

Source

pub fn type(&self) -> Type

Returns the enum value of type, or the default if the field is set to an invalid enum value.

Source

pub fn set_type(&mut self, value: Type)

Sets type to the provided enum value.

Trait Implementations§

Source§

impl Clone for BaseCommand

Source§

fn clone(&self) -> BaseCommand

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BaseCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BaseCommand

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for BaseCommand

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, 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,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for BaseCommand

Source§

fn eq(&self, other: &BaseCommand) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for BaseCommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more