Struct rustix::event::epoll::EventVec

source ·
pub struct EventVec { /* private fields */ }
Expand description

A vector of epoll::Events, plus context for interpreting them.

Implementations§

source§

impl EventVec

source

pub unsafe fn from_raw_parts( ptr: *mut Event, len: usize, capacity: usize, ) -> Self

Constructs an epoll::EventVec from raw pointer, length, and capacity.

§Safety

This function calls Vec::from_raw_parts with its arguments.

source

pub fn with_capacity(capacity: usize) -> Self

Constructs an epoll::EventVec with memory for capacity epoll::Events.

source

pub fn capacity(&self) -> usize

Returns the current epoll::Event capacity of this epoll::EventVec.

source

pub fn reserve(&mut self, additional: usize)

Reserves enough memory for at least additional more epoll::Events.

source

pub fn reserve_exact(&mut self, additional: usize)

Reserves enough memory for exactly additional more epoll::Events.

source

pub fn clear(&mut self)

Clears all the epoll::Events out of this epoll::EventVec.

source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of this epoll::EventVec as much as possible.

source

pub fn iter(&self) -> Iter<'_>

Returns an iterator over the epoll::Events in this epoll::EventVec.

source

pub fn len(&mut self) -> usize

Returns the number of epoll::Events logically contained in this epoll::EventVec.

source

pub fn is_empty(&mut self) -> bool

Tests whether this epoll::EventVec is logically empty.

Trait Implementations§

source§

impl<'a> IntoIterator for &'a EventVec

source§

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?
source§

type Item = Event

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.