[][src]Struct zbus::MessageFields

pub struct MessageFields<'m>(_);

A collection of MessageField instances.

Implementations

impl<'m> MessageFields<'m>[src]

pub fn new() -> Self[src]

Creates an empty collection of fields.

pub fn add<'f: 'm>(&mut self, field: MessageField<'f>)[src]

Appends a MessageField to the collection of fields in the message.

pub fn get(&self) -> &[MessageField<'m>][src]

Returns a slice with all the MessageField in the message.

pub fn get_field(&self, code: MessageFieldCode) -> Option<&MessageField<'m>>[src]

Gets a reference to a specific MessageField by its code.

Returns None if the message has no such field.

pub fn into_field(self, code: MessageFieldCode) -> Option<MessageField<'m>>[src]

Consumes the MessageFields and returns a specific MessageField by its code.

Returns None if the message has no such field.

Trait Implementations

impl<'m> Debug for MessageFields<'m>[src]

impl<'m> Default for MessageFields<'m>[src]

impl<'m> Deref for MessageFields<'m>[src]

type Target = [MessageField<'m>]

The resulting type after dereferencing.

impl<'de: 'm, 'm> Deserialize<'de> for MessageFields<'m>[src]

impl<'m> Serialize for MessageFields<'m>[src]

impl<'m> Type for MessageFields<'m>[src]

Auto Trait Implementations

impl<'m> RefUnwindSafe for MessageFields<'m>

impl<'m> Send for MessageFields<'m>

impl<'m> Sync for MessageFields<'m>

impl<'m> Unpin for MessageFields<'m>

impl<'m> UnwindSafe for MessageFields<'m>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.