pub struct Message {
pub bytes: Vec<u8>,
pub metadata: HashMap<String, Value>,
pub message_type: MessageType,
pub stream_id: Option<String>,
}Expand description
Message is the uniform struct utilized within all modules of fiddler.
let content = "This is a message being processed";
let message = Message{
bytes: content.as_bytes().into(),
..Default::default()
};Fields§
§bytes: Vec<u8>raw bytes of of the message to be collected, processed, and sent
metadata: HashMap<String, Value>metadata about the message
message_type: MessageTypeSpecified message types. If [MessageType::Parent] is provided, no processing of the event will take place, but the callback will be called when all child messages have been processed. This gives modules the ability to tier callback actions. Such as a module that receives a file from queue and then processes all the lines in said file. Each line will be it’s own Message; where the parent callback will delete the message once all lines are processed
stream_id: Option<String>[Optional] Specifies the stream_id of the associated stream of messages with a shared callback
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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