Enum StreamSocketProtocol
#[repr(u32)]pub enum StreamSocketProtocol {
Tcp = 0,
}
Expand description
Protocols supported by [fuchsia.posix.socket/StreamSocket
].
StreamSocketProtocol
enumerates the protocols supported by the network
stack over stream sockets.
Variants§
Tcp = 0
TCP (Transmission Control Protocol).
A TCP socket is equivalent to the POSIX API of SOCK_STREAM
with a
protocol of 0 or IPPROTO_TCP
.
Implementations§
§impl StreamSocketProtocol
impl StreamSocketProtocol
pub fn from_primitive(prim: u32) -> Option<StreamSocketProtocol>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for StreamSocketProtocol
impl Clone for StreamSocketProtocol
§fn clone(&self) -> StreamSocketProtocol
fn clone(&self) -> StreamSocketProtocol
Returns a copy 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 more§impl Debug for StreamSocketProtocol
impl Debug for StreamSocketProtocol
§impl<D> Decode<StreamSocketProtocol, D> for StreamSocketProtocolwhere
D: ResourceDialect,
impl<D> Decode<StreamSocketProtocol, D> for StreamSocketProtocolwhere
D: ResourceDialect,
§fn new_empty() -> StreamSocketProtocol
fn new_empty() -> StreamSocketProtocol
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<StreamSocketProtocol, D> for StreamSocketProtocolwhere
D: ResourceDialect,
impl<D> Encode<StreamSocketProtocol, D> for StreamSocketProtocolwhere
D: ResourceDialect,
§impl Hash for StreamSocketProtocol
impl Hash for StreamSocketProtocol
§impl Ord for StreamSocketProtocol
impl Ord for StreamSocketProtocol
§fn cmp(&self, other: &StreamSocketProtocol) -> Ordering
fn cmp(&self, other: &StreamSocketProtocol) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for StreamSocketProtocol
impl PartialEq for StreamSocketProtocol
§impl PartialOrd for StreamSocketProtocol
impl PartialOrd for StreamSocketProtocol
§impl TypeMarker for StreamSocketProtocol
impl TypeMarker for StreamSocketProtocol
§type Owned = StreamSocketProtocol
type Owned = StreamSocketProtocol
The owned Rust type which this FIDL type decodes into.
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for StreamSocketProtocol
impl ValueTypeMarker for StreamSocketProtocol
§type Borrowed<'a> = StreamSocketProtocol
type Borrowed<'a> = StreamSocketProtocol
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<StreamSocketProtocol as TypeMarker>::Owned,
) -> <StreamSocketProtocol as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<StreamSocketProtocol as TypeMarker>::Owned, ) -> <StreamSocketProtocol as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for StreamSocketProtocol
impl Eq for StreamSocketProtocol
impl StructuralPartialEq for StreamSocketProtocol
Auto Trait Implementations§
impl Freeze for StreamSocketProtocol
impl RefUnwindSafe for StreamSocketProtocol
impl Send for StreamSocketProtocol
impl Sync for StreamSocketProtocol
impl Unpin for StreamSocketProtocol
impl UnwindSafe for StreamSocketProtocol
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