pub trait TransmitQueueContext<D: Device, BC>: TransmitQueueCommon<D, BC> {
// Required methods
fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O;
fn send_frame(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
dequeue_context: Option<&mut Self::DequeueContext>,
meta: Self::Meta,
buf: Self::Buffer,
) -> Result<(), DeviceSendFrameError>;
}
Expand description
The execution context for a transmit queue.
Required Methods§
Sourcefn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_transmit_queue_mut<O, F: FnOnce(&mut TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls cb
with mutable access to the queue state.
Sourcefn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
fn with_transmit_queue<O, F: FnOnce(&TransmitQueueState<Self::Meta, Self::Buffer, Self::Allocator>) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O
Calls cb
with immutable access to the queue state.
Sourcefn send_frame(
&mut self,
bindings_ctx: &mut BC,
device_id: &Self::DeviceId,
dequeue_context: Option<&mut Self::DequeueContext>,
meta: Self::Meta,
buf: Self::Buffer,
) -> Result<(), DeviceSendFrameError>
fn send_frame( &mut self, bindings_ctx: &mut BC, device_id: &Self::DeviceId, dequeue_context: Option<&mut Self::DequeueContext>, meta: Self::Meta, buf: Self::Buffer, ) -> Result<(), DeviceSendFrameError>
Send a frame out the device.
This method may not block - if the device is not ready, an appropriate error must be returned.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.