Trait stdto_core::ToBytes
source · pub trait ToBytes {
const OPTIONS: ToBytesOptions = _;
Show 32 methods
fn try_to_be_bytes(&self) -> Result<Vec<u8>>
where
Self: Serialize,
{ ... }
fn try_to_le_bytes(&self) -> Result<Vec<u8>>
where
Self: Serialize,
{ ... }
fn try_to_ne_bytes(&self) -> Result<Vec<u8>>
where
Self: Serialize,
{ ... }
fn try_to_be_bytes_into(&self, writer: impl Write) -> Result<()>
where
Self: Serialize,
{ ... }
fn try_to_le_bytes_into(&self, writer: impl Write) -> Result<()>
where
Self: Serialize,
{ ... }
fn try_to_ne_bytes_into(&self, writer: impl Write) -> Result<()>
where
Self: Serialize,
{ ... }
fn to_be_bytes(&self) -> Vec<u8>
where
Self: Serialize,
{ ... }
fn to_le_bytes(&self) -> Vec<u8>
where
Self: Serialize,
{ ... }
fn to_ne_bytes(&self) -> Vec<u8>
where
Self: Serialize,
{ ... }
fn to_be_bytes_into(&self, writer: impl Write)
where
Self: Serialize,
{ ... }
fn to_le_bytes_into(&self, writer: impl Write)
where
Self: Serialize,
{ ... }
fn to_ne_bytes_into(&self, writer: impl Write)
where
Self: Serialize,
{ ... }
fn try_from_be_bytes<'a>(bytes: &'a [u8]) -> Result<Self>
where
Self: Deserialize<'a>,
{ ... }
fn try_from_le_bytes<'a>(bytes: &'a [u8]) -> Result<Self>
where
Self: Deserialize<'a>,
{ ... }
fn try_from_ne_bytes<'a>(bytes: &'a [u8]) -> Result<Self>
where
Self: Deserialize<'a>,
{ ... }
fn try_from_be_bytes_from(reader: impl Read) -> Result<Self>
where
Self: DeserializeOwned,
{ ... }
fn try_from_le_bytes_from(reader: impl Read) -> Result<Self>
where
Self: DeserializeOwned,
{ ... }
fn try_from_ne_bytes_from(reader: impl Read) -> Result<Self>
where
Self: DeserializeOwned,
{ ... }
fn from_be_bytes<'a>(bytes: &'a [u8]) -> Self
where
Self: Deserialize<'a>,
{ ... }
fn from_le_bytes<'a>(bytes: &'a [u8]) -> Self
where
Self: Deserialize<'a>,
{ ... }
fn from_ne_bytes<'a>(bytes: &'a [u8]) -> Self
where
Self: Deserialize<'a>,
{ ... }
fn from_be_bytes_from(reader: impl Read) -> Self
where
Self: DeserializeOwned,
{ ... }
fn from_le_bytes_from(reader: impl Read) -> Self
where
Self: DeserializeOwned,
{ ... }
fn from_ne_bytes_from(reader: impl Read) -> Self
where
Self: DeserializeOwned,
{ ... }
fn try_to_bytes(&self) -> Result<Vec<u8>>
where
Self: Serialize,
{ ... }
fn try_to_bytes_into(&self, writer: impl Write) -> Result<()>
where
Self: Serialize,
{ ... }
fn try_from_bytes<'a>(bytes: &'a [u8]) -> Result<Self>
where
Self: Deserialize<'a>,
{ ... }
fn try_from_bytes_from(reader: impl Read) -> Result<Self>
where
Self: DeserializeOwned,
{ ... }
fn to_bytes(&self) -> Vec<u8>
where
Self: Serialize,
{ ... }
fn to_bytes_into(&self, writer: impl Write)
where
Self: Serialize,
{ ... }
fn from_bytes<'a>(bytes: &'a [u8]) -> Self
where
Self: Deserialize<'a>,
{ ... }
fn from_bytes_from(reader: impl Read) -> Self
where
Self: DeserializeOwned,
{ ... }
}Provided Associated Constants§
const OPTIONS: ToBytesOptions = _
Provided Methods§
fn try_to_le_bytes(&self) -> Result<Vec<u8>>where
Self: Serialize,
fn try_to_ne_bytes(&self) -> Result<Vec<u8>>where
Self: Serialize,
fn try_to_be_bytes_into(&self, writer: impl Write) -> Result<()>where
Self: Serialize,
fn try_to_le_bytes_into(&self, writer: impl Write) -> Result<()>where
Self: Serialize,
fn try_to_ne_bytes_into(&self, writer: impl Write) -> Result<()>where
Self: Serialize,
fn to_be_bytes(&self) -> Vec<u8>where
Self: Serialize,
fn to_le_bytes(&self) -> Vec<u8>where
Self: Serialize,
fn to_ne_bytes(&self) -> Vec<u8>where
Self: Serialize,
fn to_be_bytes_into(&self, writer: impl Write)where
Self: Serialize,
fn to_le_bytes_into(&self, writer: impl Write)where
Self: Serialize,
fn to_ne_bytes_into(&self, writer: impl Write)where
Self: Serialize,
sourcefn try_from_be_bytes<'a>(bytes: &'a [u8]) -> Result<Self>where
Self: Deserialize<'a>,
fn try_from_be_bytes<'a>(bytes: &'a [u8]) -> Result<Self>where
Self: Deserialize<'a>,
Deserialize from bytes.