pub enum ConnectionLayerMode {
OOB,
Connection(ConnectionLayer),
}
Expand description
Represents the mode of a connection layer, which can be either Out-Of-Band (OOB) or an active connection.
Variants§
OOB
Connection(ConnectionLayer)
Implementations§
Source§impl ConnectionLayerMode
impl ConnectionLayerMode
Sourcepub fn to_stream(&self, stream: &mut impl WriteOctetStream) -> Result<()>
pub fn to_stream(&self, stream: &mut impl WriteOctetStream) -> Result<()>
Serializes the ConnectionLayerMode
into the provided output stream.
§Arguments
stream
- A mutable reference to a stream implementingWriteOctetStream
.
§Errors
Returns an io::Result
error if writing to the stream fails.
Sourcepub fn from_stream(stream: &mut impl ReadOctetStream) -> Result<Self>
pub fn from_stream(stream: &mut impl ReadOctetStream) -> Result<Self>
Deserializes a ConnectionLayerMode
from the provided input stream.
§Arguments
stream
- A mutable reference to a stream implementingReadOctetStream
.
§Returns
A Result
containing the ConnectionLayerMode
if successful, or an io::Result
error if reading fails.
Trait Implementations§
Source§impl Debug for ConnectionLayerMode
impl Debug for ConnectionLayerMode
Source§impl PartialEq for ConnectionLayerMode
impl PartialEq for ConnectionLayerMode
impl Eq for ConnectionLayerMode
impl StructuralPartialEq for ConnectionLayerMode
Auto Trait Implementations§
impl Freeze for ConnectionLayerMode
impl RefUnwindSafe for ConnectionLayerMode
impl Send for ConnectionLayerMode
impl Sync for ConnectionLayerMode
impl Unpin for ConnectionLayerMode
impl UnwindSafe for ConnectionLayerMode
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