pub struct SlimHeader {
pub source: Option<Name>,
pub destination: Option<Name>,
pub fanout: u32,
pub recv_from: Option<u64>,
pub forward_to: Option<u64>,
pub incoming_conn: Option<u64>,
pub error: Option<bool>,
}Expand description
recvFrom = connection from where the sub/unsub is supposed to be received forwardTo = connection where to forward the message incomingConn = connection from where the packet was received error = if true the publication contains an error notification
Fields§
§source: Option<Name>§destination: Option<Name>§fanout: u32§recv_from: Option<u64>§forward_to: Option<u64>§incoming_conn: Option<u64>§error: Option<bool>Implementations§
Source§impl SlimHeader
impl SlimHeader
Sourcepub fn recv_from(&self) -> u64
pub fn recv_from(&self) -> u64
Returns the value of recv_from, or the default value if recv_from is unset.
Sourcepub fn forward_to(&self) -> u64
pub fn forward_to(&self) -> u64
Returns the value of forward_to, or the default value if forward_to is unset.
Sourcepub fn incoming_conn(&self) -> u64
pub fn incoming_conn(&self) -> u64
Returns the value of incoming_conn, or the default value if incoming_conn is unset.
Source§impl SlimHeader
SLIM Header
This header is used to identify the source and destination of the message
and to manage the connections used to send and receive the message
impl SlimHeader
SLIM Header This header is used to identify the source and destination of the message and to manage the connections used to send and receive the message
pub fn new( source: &Name, destination: &Name, flags: Option<SlimHeaderFlags>, ) -> Self
pub fn clear(&mut self)
pub fn get_recv_from(&self) -> Option<u64>
pub fn get_forward_to(&self) -> Option<u64>
pub fn get_incoming_conn(&self) -> Option<u64>
pub fn get_error(&self) -> Option<bool>
pub fn get_source(&self) -> Name
pub fn get_dst(&self) -> Name
pub fn set_source(&mut self, source: &Name)
pub fn set_destination(&mut self, dst: &Name)
pub fn get_fanout(&self) -> u32
pub fn set_recv_from(&mut self, recv_from: Option<u64>)
pub fn set_forward_to(&mut self, forward_to: Option<u64>)
pub fn set_error(&mut self, error: Option<bool>)
pub fn set_incoming_conn(&mut self, incoming_conn: Option<u64>)
pub fn set_error_flag(&mut self, error: Option<bool>)
pub fn set_fanout(&mut self, fanout: u32)
pub fn get_in_out_connections(&self) -> (u64, Option<u64>)
Trait Implementations§
Source§impl Clone for SlimHeader
impl Clone for SlimHeader
Source§fn clone(&self) -> SlimHeader
fn clone(&self) -> SlimHeader
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 SlimHeader
impl Debug for SlimHeader
Source§impl Default for SlimHeader
impl Default for SlimHeader
Source§impl Message for SlimHeader
impl Message for SlimHeader
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 SlimHeader
impl PartialEq for SlimHeader
impl Copy for SlimHeader
impl StructuralPartialEq for SlimHeader
Auto Trait Implementations§
impl Freeze for SlimHeader
impl RefUnwindSafe for SlimHeader
impl Send for SlimHeader
impl Sync for SlimHeader
impl Unpin for SlimHeader
impl UnwindSafe for SlimHeader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request