pub struct BundleElement<E> {
pub id: u8,
pub element: E,
pub request_id: Option<u32>,
}Expand description
The full description of an element being read or to be written. Including its numeric identifier (0xFF if reply), the element itself and the optional request id.
Fields§
§id: u8Numeric identifier of the element.
element: EThe actual element. TODO: Rename to “payload”
request_id: Option<u32>The request ID if the element is a request. Not to be confused
with the reply ID if the element is a Reply.
Implementations§
Source§impl<E> BundleElement<E>
impl<E> BundleElement<E>
Sourcepub fn map<U, F: FnOnce(E) -> U>(self, f: F) -> BundleElement<U>
pub fn map<U, F: FnOnce(E) -> U>(self, f: F) -> BundleElement<U>
Map this read element’s type into another one with the given closure.
Trait Implementations§
Source§impl<E: Clone> Clone for BundleElement<E>
impl<E: Clone> Clone for BundleElement<E>
Source§fn clone(&self) -> BundleElement<E>
fn clone(&self) -> BundleElement<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: Debug> Debug for BundleElement<E>
impl<E: Debug> Debug for BundleElement<E>
Source§impl<E: Element> From<BundleElement<Reply<E>>> for BundleElement<E>
impl<E: Element> From<BundleElement<Reply<E>>> for BundleElement<E>
Source§fn from(read: BundleElement<Reply<E>>) -> Self
fn from(read: BundleElement<Reply<E>>) -> Self
Converts to this type from the input type.
Source§impl<E: PartialEq> PartialEq for BundleElement<E>
impl<E: PartialEq> PartialEq for BundleElement<E>
impl<E: Eq> Eq for BundleElement<E>
impl<E> StructuralPartialEq for BundleElement<E>
Auto Trait Implementations§
impl<E> Freeze for BundleElement<E>where
E: Freeze,
impl<E> RefUnwindSafe for BundleElement<E>where
E: RefUnwindSafe,
impl<E> Send for BundleElement<E>where
E: Send,
impl<E> Sync for BundleElement<E>where
E: Sync,
impl<E> Unpin for BundleElement<E>where
E: Unpin,
impl<E> UnwindSafe for BundleElement<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.