pub struct StreamPolicy { /* private fields */ }Expand description
Complete stream behavior fixed before the first observation.
Implementations§
Source§impl StreamPolicy
impl StreamPolicy
Sourcepub const fn new(
kind: StreamKind,
framing: StreamFraming,
sink_mode: StreamSinkMode,
limits: StreamLimits,
) -> Result<Self, StreamPolicyError>
pub const fn new( kind: StreamKind, framing: StreamFraming, sink_mode: StreamSinkMode, limits: StreamLimits, ) -> Result<Self, StreamPolicyError>
Creates a coherent stream policy without permissive defaults.
Sourcepub const fn kind(self) -> StreamKind
pub const fn kind(self) -> StreamKind
Returns the operation shape.
Sourcepub const fn framing(self) -> StreamFraming
pub const fn framing(self) -> StreamFraming
Returns the explicit wire framing policy.
Sourcepub const fn sink_mode(self) -> StreamSinkMode
pub const fn sink_mode(self) -> StreamSinkMode
Returns partial-byte visibility policy.
Sourcepub const fn limits(self) -> StreamLimits
pub const fn limits(self) -> StreamLimits
Returns all hard limits.
Trait Implementations§
Source§impl Clone for StreamPolicy
impl Clone for StreamPolicy
Source§fn clone(&self) -> StreamPolicy
fn clone(&self) -> StreamPolicy
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 StreamPolicy
Source§impl Debug for StreamPolicy
impl Debug for StreamPolicy
impl Eq for StreamPolicy
Source§impl Hash for StreamPolicy
impl Hash for StreamPolicy
Source§impl Ord for StreamPolicy
impl Ord for StreamPolicy
Source§fn cmp(&self, other: &StreamPolicy) -> Ordering
fn cmp(&self, other: &StreamPolicy) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StreamPolicy
impl PartialEq for StreamPolicy
Source§impl PartialOrd for StreamPolicy
impl PartialOrd for StreamPolicy
impl StructuralPartialEq for StreamPolicy
Auto Trait Implementations§
impl Freeze for StreamPolicy
impl RefUnwindSafe for StreamPolicy
impl Send for StreamPolicy
impl Sync for StreamPolicy
impl Unpin for StreamPolicy
impl UnsafeUnpin for StreamPolicy
impl UnwindSafe for StreamPolicy
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