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.
Trait Implementations§
Source§impl Debug for SessionInfo
impl Debug for SessionInfo
Source§impl Decode<SessionInfo, DefaultFuchsiaResourceDialect> for SessionInfo
impl Decode<SessionInfo, DefaultFuchsiaResourceDialect> for SessionInfo
Source§impl Default for SessionInfo
impl Default for SessionInfo
Source§fn default() -> SessionInfo
fn default() -> SessionInfo
Source§impl Encode<SessionInfo, DefaultFuchsiaResourceDialect> for &mut SessionInfo
impl Encode<SessionInfo, DefaultFuchsiaResourceDialect> for &mut SessionInfo
Source§impl PartialEq for SessionInfo
impl PartialEq for SessionInfo
Source§impl ResourceTypeMarker for SessionInfo
impl ResourceTypeMarker for SessionInfo
Source§type Borrowed<'a> = &'a mut SessionInfo
type Borrowed<'a> = &'a mut SessionInfo
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for SessionInfo
impl TypeMarker for SessionInfo
Source§type Owned = SessionInfo
type Owned = 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 encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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.