pub struct InboundText {
pub payload: Vec<u8>,
pub received_at_ms: Option<u64>,
pub rx: RxSummary,
/* private fields */
}Expand description
A text frame copied out of a receive callback.
The callback runs inside the node’s pump, where the chat facade is not
at hand, so the channel is held by the key that authenticated the frame
until InboundText::source resolves it against the facade’s channels.
Fields§
§payload: Vec<u8>The text payload, without the payload-type byte.
received_at_ms: Option<u64>§rx: RxSummaryImplementations§
Source§impl InboundText
impl InboundText
Sourcepub fn channel_key(&self) -> Option<ChannelKey>
pub fn channel_key(&self) -> Option<ChannelKey>
The key of the channel it came on, for a channel frame: one the node holds, since the key authenticated the frame.
Sourcepub fn source(&self, channels: &ChannelRegistry) -> Option<TextSource>
pub fn source(&self, channels: &ChannelRegistry) -> Option<TextSource>
Who sent it, with its channel named by tag. None when channels
does not hold the channel—one the session has left.
Trait Implementations§
Source§impl Clone for InboundText
impl Clone for InboundText
Source§fn clone(&self) -> InboundText
fn clone(&self) -> InboundText
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InboundText
impl RefUnwindSafe for InboundText
impl Send for InboundText
impl Sync for InboundText
impl Unpin for InboundText
impl UnwindSafe for InboundText
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)