pub struct StreamOffers { /* private fields */ }Expand description
The 065 offers one preface carries, restricted to encodings this build
implements. identity ends both lists implicitly and is never listed.
Implementations§
Source§impl StreamOffers
impl StreamOffers
Sourcepub fn new(encodings: &[StreamEncoding]) -> Result<Self, &'static str>
pub fn new(encodings: &[StreamEncoding]) -> Result<Self, &'static str>
The offers of a carrier configured with one ordered list, used as its encode preference and its decode set.
Sourcepub fn decode(&self) -> &[StreamEncoding]
pub fn decode(&self) -> &[StreamEncoding]
Encodings the sender decodes: its preface’s Decode field.
Sourcepub fn encode(&self) -> &[StreamEncoding]
pub fn encode(&self) -> &[StreamEncoding]
Encodings the sender produces, most preferred first: its preface’s
Encode field.
Sourcepub fn select(sender: &Self, receiver: &Self) -> StreamEncoding
pub fn select(sender: &Self, receiver: &Self) -> StreamEncoding
The encoding of the direction from sender to receiver.
Trait Implementations§
Source§impl Clone for StreamOffers
impl Clone for StreamOffers
Source§fn clone(&self) -> StreamOffers
fn clone(&self) -> StreamOffers
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 moreSource§impl Debug for StreamOffers
impl Debug for StreamOffers
Source§impl Default for StreamOffers
impl Default for StreamOffers
Source§fn default() -> StreamOffers
fn default() -> StreamOffers
Returns the “default value” for a type. Read more
impl Eq for StreamOffers
Source§impl PartialEq for StreamOffers
impl PartialEq for StreamOffers
Source§fn eq(&self, other: &StreamOffers) -> bool
fn eq(&self, other: &StreamOffers) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamOffers
Auto Trait Implementations§
impl Freeze for StreamOffers
impl RefUnwindSafe for StreamOffers
impl Send for StreamOffers
impl Sync for StreamOffers
impl Unpin for StreamOffers
impl UnsafeUnpin for StreamOffers
impl UnwindSafe for StreamOffers
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