Skip to main content
RingBuffer
ferromatch_
io
0.2.0
Ring
Buffer
Associated Functions
new
Methods
capacity
is_empty
len
pop
push
Trait Implementations
Default
Send
Sync
Auto Trait Implementations
!Freeze
!RefUnwindSafe
Unpin
UnsafeUnpin
UnwindSafe
Blanket Implementations
Any
Borrow<T>
BorrowMut<T>
From<T>
Into<U>
TryFrom<U>
TryInto<U>
In ferromatch_
io::
ringbuf
ferromatch_io
::
ringbuf
Struct
Ring
Buffer
Copy item path
pub struct RingBuffer<T, const N:
usize
> {
/* private fields */
}
Implementations
§
§
impl<T, const N:
usize
>
RingBuffer
<T, N>
pub fn
new
() -> Self
pub fn
push
(&self, item: T) ->
Result
<
()
, T>
pub fn
pop
(&self) ->
Option
<T>
pub fn
len
(&self) ->
usize
pub fn
is_empty
(&self) ->
bool
pub const fn
capacity
(&self) ->
usize
Trait Implementations
§
§
impl<T, const N:
usize
>
Default
for
RingBuffer
<T, N>
§
fn
default
() -> Self
§
impl<T:
Send
, const N:
usize
>
Send
for
RingBuffer
<T, N>
§
impl<T:
Send
, const N:
usize
>
Sync
for
RingBuffer
<T, N>
Auto Trait Implementations
§
§
impl<T, const N:
usize
> !
Freeze
for
RingBuffer
<T, N>
§
impl<T, const N:
usize
> !
RefUnwindSafe
for
RingBuffer
<T, N>
§
impl<T, const N:
usize
>
Unpin
for
RingBuffer
<T, N>
where T:
Unpin
,
§
impl<T, const N:
usize
>
UnsafeUnpin
for
RingBuffer
<T, N>
where T:
UnsafeUnpin
,
§
impl<T, const N:
usize
>
UnwindSafe
for
RingBuffer
<T, N>
where T:
UnwindSafe
,
Blanket Implementations
§
§
impl<T>
Any
for T
where T: 'static + ?
Sized
,
§
fn
type_id
(&self) ->
TypeId
§
impl<T>
Borrow
<T> for T
where T: ?
Sized
,
§
fn
borrow
(&self) ->
&T
§
impl<T>
BorrowMut
<T> for T
where T: ?
Sized
,
§
fn
borrow_mut
(&mut self) ->
&mut T
§
impl<T>
From
<T> for T
§
fn
from
(t: T) -> T
§
impl<T, U>
Into
<U> for T
where U:
From
<T>,
§
fn
into
(self) -> U
§
impl<T, U>
TryFrom
<U> for T
where U:
Into
<T>,
§
type
Error
=
Infallible
§
fn
try_from
(value: U) ->
Result
<T, <T as
TryFrom
<U>>::
Error
>
§
impl<T, U>
TryInto
<U> for T
where U:
TryFrom
<T>,
§
type
Error
= <U as
TryFrom
<T>>::
Error
§
fn
try_into
(self) ->
Result
<U, <U as
TryFrom
<T>>::
Error
>