cloudevents::event

Trait AttributesWriter

Source
pub trait AttributesWriter {
    // Required methods
    fn set_id(&mut self, id: impl Into<String>) -> String;
    fn set_source(&mut self, source: impl Into<UriReference>) -> UriReference;
    fn set_type(&mut self, ty: impl Into<String>) -> String;
    fn set_subject(
        &mut self,
        subject: Option<impl Into<String>>,
    ) -> Option<String>;
    fn set_time(
        &mut self,
        time: Option<impl Into<DateTime<Utc>>>,
    ) -> Option<DateTime<Utc>>;
    fn set_datacontenttype(
        &mut self,
        datacontenttype: Option<impl Into<String>>,
    ) -> Option<String>;
    fn set_dataschema(
        &mut self,
        dataschema: Option<impl Into<Url>>,
    ) -> Option<Url>;
}
Expand description

Required Methods§

Source

fn set_id(&mut self, id: impl Into<String>) -> String

Set the id. Returns the previous value.

Source

fn set_source(&mut self, source: impl Into<UriReference>) -> UriReference

Set the source. Returns the previous value.

Source

fn set_type(&mut self, ty: impl Into<String>) -> String

Set the type. Returns the previous value.

Source

fn set_subject(&mut self, subject: Option<impl Into<String>>) -> Option<String>

Set the subject. Returns the previous value.

Source

fn set_time( &mut self, time: Option<impl Into<DateTime<Utc>>>, ) -> Option<DateTime<Utc>>

Set the time. Returns the previous value.

Source

fn set_datacontenttype( &mut self, datacontenttype: Option<impl Into<String>>, ) -> Option<String>

Set the datacontenttype. Returns the previous value.

Source

fn set_dataschema(&mut self, dataschema: Option<impl Into<Url>>) -> Option<Url>

Set the dataschema. Returns the previous value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AttributesWriter for cloudevents::event::Attributes

Source§

impl AttributesWriter for cloudevents::event::AttributesV03

Source§

impl AttributesWriter for cloudevents::event::AttributesV10

Source§

impl AttributesWriter for Event