pub struct StreamMessage {
pub request_id: u64,
pub msg_id: MessageID,
pub payload: Bytes,
pub publish_time: u64,
pub producer_name: String,
pub subscription_name: Option<String>,
pub attributes: HashMap<String, String>,
pub schema_id: Option<u64>,
pub schema_version: Option<u32>,
pub routing_key: Option<String>,
}Fields§
§request_id: u64§msg_id: MessageID§payload: Bytes§publish_time: u64§producer_name: String§subscription_name: Option<String>§attributes: HashMap<String, String>§schema_id: Option<u64>§schema_version: Option<u32>§routing_key: Option<String>Implementations§
Source§impl StreamMessage
impl StreamMessage
pub fn size(&self) -> usize
pub fn add_subscription_name(&mut self, subscription_name: &String)
Sourcepub fn effective_routing_key(&self) -> &str
pub fn effective_routing_key(&self) -> &str
Returns the effective routing key for dispatch decisions. Falls back to producer_name if no explicit routing_key is set.
Trait Implementations§
Source§impl Clone for StreamMessage
impl Clone for StreamMessage
Source§fn clone(&self) -> StreamMessage
fn clone(&self) -> StreamMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StreamMessage
impl Debug for StreamMessage
Source§impl<'de> Deserialize<'de> for StreamMessage
impl<'de> Deserialize<'de> for StreamMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 From<StreamMessage> for StreamMessage
impl From<StreamMessage> for StreamMessage
Source§fn from(proto_stream_msg: ProtoStreamMessage) -> Self
fn from(proto_stream_msg: ProtoStreamMessage) -> Self
Converts to this type from the input type.
Source§impl From<StreamMessage> for StreamMessage
impl From<StreamMessage> for StreamMessage
Source§fn from(stream_msg: StreamMessage) -> Self
fn from(stream_msg: StreamMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for StreamMessage
impl RefUnwindSafe for StreamMessage
impl Send for StreamMessage
impl Sync for StreamMessage
impl Unpin for StreamMessage
impl UnsafeUnpin for StreamMessage
impl UnwindSafe for StreamMessage
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> 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::Request