pub fn binary<S>(event_type: S, payload: Bytes) -> Self
    where
        S: AsRef<str>,
    {
        let mut metadata = HashMap::new();
        metadata.insert("type".to_owned(), event_type.as_ref().to_owned());
        metadata.insert(
            "content-type".to_owned(),
            "application/octet-stream".to_owned(),
        );

        EventData {
            payload,
            id_opt: None,
            metadata,
            custom_metadata: None,
        }
    }
/// Creates an event with a raw binary payload.
Creates an event with a raw binary payload.
Creates an event with a raw binary payload .
pub fn binary<S>(event_type: S, payload: Bytes) -> Self
    where
        S: AsRef<str>,
    {
        let mut metadata = HashMap::new();
        metadata.insert("type".to_owned(), event_type.as_ref().to_owned());
        metadata.insert(
            "content-type".to_owned(),
            "application/octet-stream".to_owned(),
        );
        EventData {
            payload,
            id_opt: None,
            metadata,
            custom_metadata: None,
        }
    }
pub fn binary < S > ( event_type : S , payload : Bytes ) -> Self where S : AsRef < str > , { let mut metadata = HashMap :: new ( ) ; metadata . insert ( " " . to_owned ( ) , event_type . as_ref ( ) . to_owned ( ) ) ; metadata . insert ( " " . to_owned ( ) , " " . to_owned ( ) , ) ; EventData { payload , id_opt : None , metadata , custom_metadata : None , } }
Creates an event with a raw binary payload.
Creates an event with a raw binary payload .
event_type
S
payload
Bytes
event_type
S
payload
Bytes