Trait MessageTransfer

Source
pub trait MessageTransfer:
    DeserializeOwned
    + Clone
    + Into<Message>
    + Send
    + Sync
    + Error
    + Debug
    + Display {
    type Error: Into<Self> + Clone + Error;
    type TransferError: Error;
    type Info: MessageInformation;

    // Required methods
    fn info(&self) -> Self::Info;
    fn error(&self) -> Option<Self::Error>;
    fn to_error(&self) -> Self::TransferError;
    fn user_request(&self) -> Option<UserRequest<Self>>;
    fn new_user(request: UserRequest<Self>) -> Self;
    fn error_info(&self) -> Option<Vec<Self::Info>>;
}

Required Associated Types§

Required Methods§

Source

fn info(&self) -> Self::Info

Source

fn error(&self) -> Option<Self::Error>

Source

fn to_error(&self) -> Self::TransferError

Source

fn user_request(&self) -> Option<UserRequest<Self>>

Source

fn new_user(request: UserRequest<Self>) -> Self

Source

fn error_info(&self) -> Option<Vec<Self::Info>>

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§