pub struct RemotingCommand { /* private fields */ }

Implementations§

source§

impl RemotingCommand

source

pub fn create_request_command( code: impl Into<i32>, header: impl CommandCustomHeader + Send + 'static ) -> Self

source

pub fn create_remoting_command(code: impl Into<i32>) -> Self

source

pub fn get_and_add() -> i32

source

pub fn set_cmd_version(self) -> Self

source

pub fn create_response_command_with_code(code: impl Into<i32>) -> Self

source

pub fn create_response_command() -> Self

source

pub fn create_response_command_with_header( header: impl CommandCustomHeader + Send + 'static ) -> Self

source

pub fn set_command_custom_header( self, command_custom_header: Option<Box<dyn CommandCustomHeader + Send + 'static>> ) -> Self

source

pub fn set_code(self, code: impl Into<i32>) -> Self

source

pub fn set_language(self, language: LanguageCode) -> Self

source

pub fn set_version(&mut self, version: i32)

source

pub fn set_opaque(self, opaque: i32) -> Self

source

pub fn set_flag(self, flag: i32) -> Self

source

pub fn set_remark(self, remark: Option<String>) -> Self

source

pub fn set_ext_fields(self, ext_fields: HashMap<String, String>) -> Self

source

pub fn set_body(self, body: Option<impl Into<Bytes>>) -> Self

source

pub fn set_suspended(self, suspended: bool) -> Self

source

pub fn set_serialize_type(self, serialize_type: SerializeType) -> Self

source

pub fn mark_response_type(self) -> Self

source

pub fn mark_oneway_rpc(self) -> Self

source

pub fn get_serialize_type(&self) -> SerializeType

source

pub fn header_encode(&self) -> Option<Bytes>

source

pub fn fast_header_encode(&self) -> Option<Bytes>

source

pub fn get_body(&self) -> Option<Bytes>

source

pub fn mark_serialize_type( header_length: i32, protocol_type: SerializeType ) -> i32

source

pub fn get_header_length(size: usize) -> usize

source

pub fn code(&self) -> i32

source

pub fn language(&self) -> &LanguageCode

source

pub fn version(&self) -> i32

source

pub fn opaque(&self) -> i32

source

pub fn flag(&self) -> i32

source

pub fn remark(&self) -> &Option<String>

source

pub fn ext_fields(&self) -> &Option<HashMap<String, String>>

source

pub fn body(&self) -> &Option<Bytes>

source

pub fn suspended(&self) -> bool

source

pub fn command_custom_header( &self ) -> &Option<Box<dyn CommandCustomHeader + Send + 'static>>

source

pub fn serialize_type(&self) -> SerializeType

source

pub fn decode_command_custom_header<T>(&self) -> Option<T>
where T: FromMap<Target = T>,

Trait Implementations§

source§

impl Default for RemotingCommand

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for RemotingCommand

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Encoder<RemotingCommand> for RemotingCommandCodec

§

type Error = RemotingError

The type of encoding errors. Read more
source§

fn encode( &mut self, item: RemotingCommand, dst: &mut BytesMut ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
source§

impl Serialize for RemotingCommand

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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<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
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,