DataDeliveryPolicy

Trait DataDeliveryPolicy 

Source
pub trait DataDeliveryPolicy: Sized {
    // Provided methods
    fn delivery_policy(&self) -> DeliveryPolicy { ... }
    fn priority(&self) -> usize { ... }
    fn eq_kind(&self, other: &Self) -> bool { ... }
    fn is_expired(&self) -> bool { ... }
}
Expand description

Implements delivery policies for own data types

Provided Methods§

Source

fn delivery_policy(&self) -> DeliveryPolicy

Delivery policy, the default is DeliveryPolicy::Always

Source

fn priority(&self) -> usize

Priority, for ordered, lower is better, the default is 100

Source

fn eq_kind(&self, other: &Self) -> bool

Has equal kind with other

(default: check enum discriminant)

Source

fn is_expired(&self) -> bool

If a frame expires during storing/delivering, it is not delivered

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.

Implementations on Foreign Types§

Source§

impl DataDeliveryPolicy for ()

Source§

impl DataDeliveryPolicy for usize

Source§

impl DataDeliveryPolicy for String

Source§

impl<T> DataDeliveryPolicy for Vec<T>

Implementors§