pub struct RingScope<'delivery, T = (), X = ()> { /* private fields */ }Expand description
Exclusive access to an EventDelivery’s ring, narrowed to what a
submitting caller needs (M18.6).
Held for as long as the value lives, so keep it to the shortest scope that covers a submission: the wait callback needs the same lock to deliver completions.
See EventDelivery::scope for what this deliberately does not expose,
and why handing out anything that yields a &mut IoRing would reopen
D-43.
Implementations§
Source§impl<T, X> RingScope<'_, T, X>
impl<T, X> RingScope<'_, T, X>
Sourcepub fn batch(&mut self) -> Batch<'_, T, X>
pub fn batch(&mut self) -> Batch<'_, T, X>
Open a Batch against the ring.
The borrow is confined to the returned batch, so no &mut IoRing
escapes to the caller.
Sourcepub fn outstanding(&self) -> usize
pub fn outstanding(&self) -> usize
Operations submitted but not yet popped, as IoRing::outstanding.
Sourcepub fn version(&self) -> RingVersion
pub fn version(&self) -> RingVersion
This ring’s negotiated version, as IoRing::version.
Sourcepub fn supports(&self, op: Op) -> bool
pub fn supports(&self, op: Op) -> bool
Whether this ring supports op, as IoRing::supports.
Sourcepub fn supports_raw(&self, op_code: IORING_OP_CODE) -> bool
pub fn supports_raw(&self, op_code: IORING_OP_CODE) -> bool
Whether this ring supports op_code, as IoRing::supports_raw.
Sourcepub fn registered_file_count(&self) -> u32
pub fn registered_file_count(&self) -> u32
Registered file count, as IoRing::registered_file_count.
Sourcepub fn registered_buffer_count(&self) -> u32
pub fn registered_buffer_count(&self) -> u32
Registered buffer count, as IoRing::registered_buffer_count.