pub struct ConnectionRequest<'a> { /* private fields */ }Expand description
Metadata wrapper with typed getters for well-known vox-* keys.
Passed to ConnectionAcceptor::accept when a peer opens a connection.
Implementations§
Source§impl<'a> ConnectionRequest<'a>
impl<'a> ConnectionRequest<'a>
Sourcepub fn new(metadata: &'a [MetadataEntry<'a>]) -> Result<Self, SessionError>
pub fn new(metadata: &'a [MetadataEntry<'a>]) -> Result<Self, SessionError>
Build a connection request from metadata.
Returns an error if the required vox-service metadata key is missing.
Sourcepub fn is_virtual(&self) -> bool
pub fn is_virtual(&self) -> bool
Whether this is a virtual connection.
Sourcepub fn metadata(&self) -> &[MetadataEntry<'a>]
pub fn metadata(&self) -> &[MetadataEntry<'a>]
Access the raw metadata entries.
Auto Trait Implementations§
impl<'a> Freeze for ConnectionRequest<'a>
impl<'a> RefUnwindSafe for ConnectionRequest<'a>
impl<'a> Send for ConnectionRequest<'a>
impl<'a> Sync for ConnectionRequest<'a>
impl<'a> Unpin for ConnectionRequest<'a>
impl<'a> UnsafeUnpin for ConnectionRequest<'a>
impl<'a> UnwindSafe for ConnectionRequest<'a>
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