pub struct PayloadEnvelope {
pub type_name: Cow<'static, str>,
pub content: Value,
pub origin: Arc<Origin>,
}Expand description
Envelope for a single Ray payload.
use ray::{Origin, PayloadEnvelope};
use serde_json::json;
let origin = std::sync::Arc::new(Origin::default());
let payload = PayloadEnvelope::new("log", json!({ "value": "hello" }), origin);
assert_eq!(payload.type_name.as_ref(), "log");Fields§
§type_name: Cow<'static, str>§content: Value§origin: Arc<Origin>Implementations§
Trait Implementations§
Source§impl Clone for PayloadEnvelope
impl Clone for PayloadEnvelope
Source§fn clone(&self) -> PayloadEnvelope
fn clone(&self) -> PayloadEnvelope
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 PayloadEnvelope
impl Debug for PayloadEnvelope
Auto Trait Implementations§
impl Freeze for PayloadEnvelope
impl RefUnwindSafe for PayloadEnvelope
impl Send for PayloadEnvelope
impl Sync for PayloadEnvelope
impl Unpin for PayloadEnvelope
impl UnwindSafe for PayloadEnvelope
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