pub trait Metadata: DeserializeOwned + Serialize + Clone + Send {
    type Error: Clone + MetadataError;

    // Required methods
    fn component_url(&self) -> Option<&str>;
    fn timestamp(&self) -> Timestamp;
    fn errors(&self) -> Option<&[Self::Error]>;
    fn set_errors(&mut self, errors: Vec<Self::Error>);

    // Provided method
    fn has_errors(&self) -> bool { ... }
}

Required Associated Types§

source

type Error: Clone + MetadataError

The type of error returned in this metadata.

Required Methods§

source

fn component_url(&self) -> Option<&str>

Returns the component URL which generated this value.

source

fn timestamp(&self) -> Timestamp

Returns the timestamp at which this value was recorded.

source

fn errors(&self) -> Option<&[Self::Error]>

Returns the errors recorded with this value, if any.

source

fn set_errors(&mut self, errors: Vec<Self::Error>)

Overrides the errors associated with this value.

Provided Methods§

source

fn has_errors(&self) -> bool

Returns whether any errors are recorded on this value.

Object Safety§

This trait is not object safe.

Implementors§