Trait relay_protocol::Empty

source ·
pub trait Empty {
    // Required method
    fn is_empty(&self) -> bool;

    // Provided method
    fn is_deep_empty(&self) -> bool { ... }
}
Expand description

A value that can be empty.

Required Methods§

source

fn is_empty(&self) -> bool

Returns whether this value is empty.

Provided Methods§

source

fn is_deep_empty(&self) -> bool

Returns whether this value is empty or all of its descendants are empty.

This only needs to be implemented for containers by calling Empty::is_deep_empty on all children. The default implementation calls Empty::is_empty.

For containers of Annotated elements, this must call Annotated::skip_serialization.

Implementations on Foreign Types§

source§

impl Empty for bool

source§

fn is_empty(&self) -> bool

source§

impl Empty for f64

source§

fn is_empty(&self) -> bool

source§

impl Empty for i64

source§

fn is_empty(&self) -> bool

source§

impl Empty for u64

source§

fn is_empty(&self) -> bool

source§

impl Empty for String

source§

fn is_empty(&self) -> bool

source§

impl Empty for Uuid

source§

fn is_empty(&self) -> bool

source§

impl<T1: Empty> Empty for (Annotated<T1>,)

source§

impl<T1: Empty, T2: Empty> Empty for (Annotated<T1>, Annotated<T2>)

source§

impl<T1: Empty, T2: Empty, T3: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty, T7: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty, T7: Empty, T8: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty, T7: Empty, T8: Empty, T9: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty, T7: Empty, T8: Empty, T9: Empty, T10: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>, Annotated<T10>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty, T7: Empty, T8: Empty, T9: Empty, T10: Empty, T11: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>, Annotated<T10>, Annotated<T11>)

source§

impl<T1: Empty, T2: Empty, T3: Empty, T4: Empty, T5: Empty, T6: Empty, T7: Empty, T8: Empty, T9: Empty, T10: Empty, T11: Empty, T12: Empty> Empty for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>, Annotated<T10>, Annotated<T11>, Annotated<T12>)

source§

impl<T> Empty for Option<T>
where T: Empty,

source§

impl<T> Empty for &T
where T: Empty,

source§

impl<T> Empty for Box<T>
where T: Empty,

Implementors§

source§

impl Empty for Value

source§

impl<T> Empty for Annotated<T>
where T: Empty,

Checks whether annotated data contains either a value or meta data.

source§

impl<T> Empty for Array<T>
where T: Empty,

source§

impl<T> Empty for Object<T>
where T: Empty,