Trait cloudevents::event::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.

Object Safety§

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