pub enum BufferStrategy {
Direct,
Ring {
capacity: usize,
},
Unbounded,
DoubleBuffer,
}Expand description
Buffering strategy for a port connection.
Variants§
Direct
No buffering; frames are passed directly (synchronous).
Ring
Fixed-size ring buffer with the given capacity.
Unbounded
Unbounded buffer (grows as needed).
DoubleBuffer
Double-buffer: producer writes to back, consumer reads from front.
Implementations§
Source§impl BufferStrategy
impl BufferStrategy
Sourcepub fn capacity_hint(&self) -> usize
pub fn capacity_hint(&self) -> usize
Get the capacity hint for this strategy (0 for unbounded/direct).
Trait Implementations§
Source§impl Clone for BufferStrategy
impl Clone for BufferStrategy
Source§fn clone(&self) -> BufferStrategy
fn clone(&self) -> BufferStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BufferStrategy
Source§impl Debug for BufferStrategy
impl Debug for BufferStrategy
Source§impl Default for BufferStrategy
impl Default for BufferStrategy
Source§impl Display for BufferStrategy
impl Display for BufferStrategy
impl Eq for BufferStrategy
Source§impl PartialEq for BufferStrategy
impl PartialEq for BufferStrategy
Source§fn eq(&self, other: &BufferStrategy) -> bool
fn eq(&self, other: &BufferStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BufferStrategy
Auto Trait Implementations§
impl Freeze for BufferStrategy
impl RefUnwindSafe for BufferStrategy
impl Send for BufferStrategy
impl Sync for BufferStrategy
impl Unpin for BufferStrategy
impl UnsafeUnpin for BufferStrategy
impl UnwindSafe for BufferStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more