Enum canadensis_core::transfer::Header
source · [−]pub enum Header<I, T: Transport + ?Sized> {
Message(MessageHeader<I, T>),
Request(ServiceHeader<I, T>),
Response(ServiceHeader<I, T>),
}
Expand description
Header fields for a message, request, or response
Variants
Message(MessageHeader<I, T>)
A message header
Request(ServiceHeader<I, T>)
A service request header
Response(ServiceHeader<I, T>)
A service response header
Implementations
sourceimpl<I, T: Transport + ?Sized> Header<I, T>
impl<I, T: Transport + ?Sized> Header<I, T>
sourcepub fn set_timestamp(&mut self, timestamp: I)
pub fn set_timestamp(&mut self, timestamp: I)
Sets the timestamp of this header
sourcepub fn set_priority(&mut self, priority: T::Priority)
pub fn set_priority(&mut self, priority: T::Priority)
Sets the priority of this header
sourcepub fn source(&self) -> Option<&T::NodeId>
pub fn source(&self) -> Option<&T::NodeId>
Returns the source node ID of this transfer, or None if this is an anonymous message
sourcepub fn port_id(&self) -> PortId
pub fn port_id(&self) -> PortId
Returns the port ID (either a subject ID or service ID) of this transfer
sourcepub fn transfer_id(&self) -> &T::TransferId
pub fn transfer_id(&self) -> &T::TransferId
Returns the transfer ID of this transfer
Trait Implementations
sourceimpl<I, T: Transport + ?Sized> Clone for Header<I, T> where
I: Clone,
T::TransferId: Clone,
T::Priority: Clone,
T::NodeId: Clone,
impl<I, T: Transport + ?Sized> Clone for Header<I, T> where
I: Clone,
T::TransferId: Clone,
T::Priority: Clone,
T::NodeId: Clone,
Auto Trait Implementations
impl<I, T: ?Sized> RefUnwindSafe for Header<I, T> where
I: RefUnwindSafe,
<T as Transport>::NodeId: RefUnwindSafe,
<T as Transport>::Priority: RefUnwindSafe,
<T as Transport>::TransferId: RefUnwindSafe,
impl<I, T: ?Sized> Send for Header<I, T> where
I: Send,
<T as Transport>::NodeId: Send,
<T as Transport>::Priority: Send,
<T as Transport>::TransferId: Send,
impl<I, T: ?Sized> Sync for Header<I, T> where
I: Sync,
<T as Transport>::NodeId: Sync,
<T as Transport>::Priority: Sync,
<T as Transport>::TransferId: Sync,
impl<I, T: ?Sized> Unpin for Header<I, T> where
I: Unpin,
<T as Transport>::NodeId: Unpin,
<T as Transport>::Priority: Unpin,
<T as Transport>::TransferId: Unpin,
impl<I, T: ?Sized> UnwindSafe for Header<I, T> where
I: UnwindSafe,
<T as Transport>::NodeId: UnwindSafe,
<T as Transport>::Priority: UnwindSafe,
<T as Transport>::TransferId: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more