Struct stun_codec::rfc5766::attributes::DataEncoder [−][src]
Data
encoder.
Implementations
impl DataEncoder
[src]
Trait Implementations
impl Debug for DataEncoder
[src]
impl Default for DataEncoder
[src]
fn default() -> DataEncoder
[src]
impl Encode for DataEncoder
[src]
type Item = Data
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
fn start_encoding(&mut self, item: Self::Item) -> Result<()>
[src]
fn requiring_bytes(&self) -> ByteCount
[src]
fn is_idle(&self) -> bool
[src]
impl SizedEncode for DataEncoder
[src]
fn exact_requiring_bytes(&self) -> u64
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataEncoder
[src]
impl Send for DataEncoder
[src]
impl Sync for DataEncoder
[src]
impl Unpin for DataEncoder
[src]
impl UnwindSafe for DataEncoder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> EncodeExt for T where
T: Encode,
[src]
T: Encode,
pub fn with_item(item: Self::Item) -> Result<Self, Error> where
Self: Default,
[src]
Self: Default,
pub fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F> where
F: Fn(Error) -> E,
Error: From<E>,
[src]
F: Fn(Error) -> E,
Error: From<E>,
pub fn map_from<T, F>(self, f: F) -> MapFrom<Self, T, F> where
F: Fn(T) -> Self::Item,
[src]
F: Fn(T) -> Self::Item,
pub fn try_map_from<T, E, F>(self, f: F) -> TryMapFrom<Self, T, E, F> where
F: Fn(T) -> Result<Self::Item, E>,
Error: From<E>,
[src]
F: Fn(T) -> Result<Self::Item, E>,
Error: From<E>,
pub fn optional(self) -> Optional<Self>
[src]
pub fn max_bytes(self, n: u64) -> MaxBytes<Self>
[src]
pub fn length(self, n: u64) -> Length<Self>
[src]
pub fn chain<T>(self, other: T) -> TupleEncoder<(Self, T)> where
T: Encode,
[src]
T: Encode,
pub fn repeat<I>(self) -> Repeat<Self, I> where
I: Iterator<Item = Self::Item>,
[src]
I: Iterator<Item = Self::Item>,
pub fn pre_encode(self) -> PreEncode<Self>
[src]
pub fn slice(self) -> Slice<Self>
[src]
pub fn last(self, item: Self::Item) -> Last<Self>
[src]
pub fn encode_into_bytes(
&mut self,
item: Self::Item
) -> Result<Vec<u8, Global>, Error>
[src]
&mut self,
item: Self::Item
) -> Result<Vec<u8, Global>, Error>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IoEncodeExt for T where
T: Encode,
[src]
T: Encode,
pub fn encode_to_write_buf<B>(
&mut self,
buf: &mut WriteBuf<B>
) -> Result<(), Error> where
B: AsMut<[u8]>,
[src]
&mut self,
buf: &mut WriteBuf<B>
) -> Result<(), Error> where
B: AsMut<[u8]>,
pub fn encode_all<W>(&mut self, writer: W) -> Result<(), Error> where
W: Write,
[src]
W: Write,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,