pub struct SessionInfo {
pub descriptors: Option<Vmo>,
pub data: Option<Vmo>,
pub descriptor_version: Option<u8>,
pub descriptor_length: Option<u8>,
pub descriptor_count: Option<u16>,
pub options: Option<SessionFlags>,
/* private fields */
}
Expand description
Session configuration.
Fields§
§descriptors: Option<Vmo>
VMO containing the descriptors. Required.
16-bit indices transmitted over the FIFOs index a descriptor in this VMO (byte offset = descriptor_length * 8 * index).
data: Option<Vmo>
VMO containing frame data. Required.
Descriptors contain byte-offsets that are used to index arbitrary
regions in data
.
descriptor_version: Option<u8>
Requested descriptor version. Required.
If the network device does not support the requested descriptor version,
[Device.OpenSession
] fails with ZX_ERR_NOT_SUPPORTED
.
descriptor_length: Option<u8>
Descriptor length, in 64-bit words. Required.
The length of each descriptor in the descriptors
VMO. This is used as
a multiplier to find byte offsets in descriptors
given a descriptor
index passed through the rx or tx FIFOs.
descriptor_count: Option<u16>
Total number of descriptors that can be used by this session. Required.
Descriptor indices transferred through either the rx or tx FIFO must be
in the range [0, descriptor_count
).
options: Option<SessionFlags>
Extra options. Interpreted as empty bitmask if absent.
Implementations§
source§impl SessionInfo
impl SessionInfo
Trait Implementations§
source§impl Debug for SessionInfo
impl Debug for SessionInfo
source§impl Decodable for SessionInfo
impl Decodable for SessionInfo
source§fn decode(&mut self, decoder: &mut Decoder<'_>, offset: usize) -> Result<()>
fn decode(&mut self, decoder: &mut Decoder<'_>, offset: usize) -> Result<()>
self
.
Callers must ensure that offset
is a multiple of
Layout::inline_align
, and that decoder.buf
has room for reading
Layout::inline_size
bytes at offset
. Read moresource§impl Encodable for SessionInfo
impl Encodable for SessionInfo
source§fn encode(
&mut self,
encoder: &mut Encoder<'_, '_>,
offset: usize,
recursion_depth: usize
) -> Result<()>
fn encode( &mut self, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize ) -> Result<()>
Handle::INVALID
. Callers must ensure that offset
is a
multiple of Layout::inline_align
, and that encoder.buf
has room for
writing Layout::inline_size
bytes at offset
. Read moresource§impl Layout for SessionInfo
impl Layout for SessionInfo
source§fn inline_align(_context: &Context) -> usize
fn inline_align(_context: &Context) -> usize
source§fn inline_size(_context: &Context) -> usize
fn inline_size(_context: &Context) -> usize
inline_align
.§fn supports_simple_copy() -> boolwhere
Self: Sized,
fn supports_simple_copy() -> boolwhere Self: Sized,
source§impl PartialEq<SessionInfo> for SessionInfo
impl PartialEq<SessionInfo> for SessionInfo
source§fn eq(&self, other: &SessionInfo) -> bool
fn eq(&self, other: &SessionInfo) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SessionInfo
impl TopLevel for SessionInfo
Auto Trait Implementations§
impl RefUnwindSafe for SessionInfo
impl Send for SessionInfo
impl Sync for SessionInfo
impl Unpin for SessionInfo
impl UnwindSafe for SessionInfo
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutObject for Twhere
T: Layout,
impl<T> LayoutObject for Twhere T: Layout,
§fn inline_align(&self, context: &Context) -> usize
fn inline_align(&self, context: &Context) -> usize
Layout::inline_align
.§fn inline_size(&self, context: &Context) -> usize
fn inline_size(&self, context: &Context) -> usize
Layout::inline_size
.