[−][src]Struct serde::bytes::ByteBuf
ByteBuf
wraps a Vec<u8>
and serializes as a byte array.
Implementations
impl ByteBuf
[src]
pub fn new() -> Self
[src]
Construct a new, empty ByteBuf
.
pub fn with_capacity(cap: usize) -> Self
[src]
Construct a new, empty ByteBuf
with the specified capacity.
pub fn from<T: Into<Vec<u8>>>(bytes: T) -> Self
[src]
Wrap existing bytes in a ByteBuf
.
Trait Implementations
impl AsMut<[u8]> for ByteBuf
[src]
impl AsMut<Vec<u8>> for ByteBuf
[src]
impl AsRef<[u8]> for ByteBuf
[src]
impl AsRef<Vec<u8>> for ByteBuf
[src]
impl Clone for ByteBuf
[src]
impl Debug for ByteBuf
[src]
impl Default for ByteBuf
[src]
impl Deref for ByteBuf
[src]
impl DerefMut for ByteBuf
[src]
impl Deserialize for ByteBuf
[src]
fn deserialize<D>(deserializer: &mut D) -> Result<ByteBuf, D::Error> where
D: Deserializer,
[src]
D: Deserializer,
impl Eq for ByteBuf
[src]
impl From<Vec<u8>> for ByteBuf
[src]
impl Hash for ByteBuf
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Into<Vec<u8>> for ByteBuf
[src]
impl Ord for ByteBuf
[src]
fn cmp(&self, other: &ByteBuf) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ByteBuf> for ByteBuf
[src]
impl PartialOrd<ByteBuf> for ByteBuf
[src]
fn partial_cmp(&self, other: &ByteBuf) -> Option<Ordering>
[src]
fn lt(&self, other: &ByteBuf) -> bool
[src]
fn le(&self, other: &ByteBuf) -> bool
[src]
fn gt(&self, other: &ByteBuf) -> bool
[src]
fn ge(&self, other: &ByteBuf) -> bool
[src]
impl Serialize for ByteBuf
[src]
impl StructuralEq for ByteBuf
[src]
impl StructuralPartialEq for ByteBuf
[src]
impl<E> ValueDeserializer<E> for ByteBuf where
E: Error,
[src]
E: Error,
type Deserializer = ByteBufDeserializer<E>
The actual deserializer type.
fn into_deserializer(self) -> Self::Deserializer
[src]
Auto Trait Implementations
impl RefUnwindSafe for ByteBuf
impl Send for ByteBuf
impl Sync for ByteBuf
impl Unpin for ByteBuf
impl UnwindSafe for ByteBuf
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,
fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,