pub struct EventVec {
events: Vec<Event>,
}
Expand description
A vector of epoll::Event
s, plus context for interpreting them.
Fields§
§events: Vec<Event>
Implementations§
source§impl EventVec
impl EventVec
sourcepub unsafe fn from_raw_parts(
ptr: *mut Event,
len: usize,
capacity: usize,
) -> Self
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.
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Constructs an epoll::EventVec
with memory for capacity
epoll::Event
s.
sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the current epoll::Event
capacity of this epoll::EventVec
.
sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves enough memory for at least additional
more epoll::Event
s.
sourcepub fn reserve_exact(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
Reserves enough memory for exactly additional
more epoll::Event
s.
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of this epoll::EventVec
as much as possible.
sourcepub fn iter(&self) -> Iter<'_> ⓘ
pub fn iter(&self) -> Iter<'_> ⓘ
Returns an iterator over the epoll::Event
s in this epoll::EventVec
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventVec
impl RefUnwindSafe for EventVec
impl !Send for EventVec
impl !Sync for EventVec
impl Unpin for EventVec
impl UnwindSafe for EventVec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more