pub struct ChannelMessageEnvelope {
pub id: String,
pub tenant: TenantCtx,
pub channel: String,
pub session_id: String,
pub reply_scope: Option<ReplyScope>,
pub from: Option<Actor>,
pub to: Vec<Destination>,
pub correlation_id: Option<String>,
pub text: Option<String>,
pub attachments: Vec<Attachment>,
pub metadata: MessageMetadata,
pub extensions: BTreeMap<String, Value>,
}Expand description
Envelope for channel messages exchanged with adapters.
NOTE: Intentionally not #[non_exhaustive] — consumers construct this
type directly via struct literals (see greentic-messaging-providers, etc).
Adding a new field is a coordinated breaking change that requires a minor
version bump and synchronized updates across consumer submodules.
Fields§
§id: StringStable identifier for the message.
tenant: TenantCtxTenant context propagated with the message.
channel: StringAbstract channel identifier or type.
session_id: StringConversation or thread identifier.
reply_scope: Option<ReplyScope>Optional reply scope that can be used for resumption.
from: Option<Actor>Optional actor (sender/initiator) associated with the message (primarily ingress).
to: Vec<Destination>Outbound destinations for egress. Empty means “unspecified” and may be satisfied by provider config defaults.
correlation_id: Option<String>Optional correlation identifier used by outbound adapters.
text: Option<String>Optional text content.
attachments: Vec<Attachment>Attachments included with the message.
metadata: MessageMetadataFree-form metadata for adapters and flows.
extensions: BTreeMap<String, Value>Structured provider-agnostic and provider-native extension data.
Use well-known keys from extensions::ext_keys to avoid typos.
Values are typed JSON (serde_json::Value) — no re-serialization
needed at provider boundaries.
Trait Implementations§
Source§impl Clone for ChannelMessageEnvelope
impl Clone for ChannelMessageEnvelope
Source§fn clone(&self) -> ChannelMessageEnvelope
fn clone(&self) -> ChannelMessageEnvelope
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChannelMessageEnvelope
impl Debug for ChannelMessageEnvelope
Source§impl<'de> Deserialize<'de> for ChannelMessageEnvelope
impl<'de> Deserialize<'de> for ChannelMessageEnvelope
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>,
Source§impl PartialEq for ChannelMessageEnvelope
impl PartialEq for ChannelMessageEnvelope
Source§impl Serialize for ChannelMessageEnvelope
impl Serialize for ChannelMessageEnvelope
impl Eq for ChannelMessageEnvelope
impl StructuralPartialEq for ChannelMessageEnvelope
Auto Trait Implementations§
impl Freeze for ChannelMessageEnvelope
impl RefUnwindSafe for ChannelMessageEnvelope
impl Send for ChannelMessageEnvelope
impl Sync for ChannelMessageEnvelope
impl Unpin for ChannelMessageEnvelope
impl UnsafeUnpin for ChannelMessageEnvelope
impl UnwindSafe for ChannelMessageEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.