pub trait ToBytes {
const OPTIONS: ToBytesOptions = ToBytesOptions{..ToBytesOptions::default()};
Show 32 methods
fn try_to_be_bytes(&self) -> Result<Vec<u8, Global>, Error>
where
Self: Serialize,
{ ... }
fn try_to_le_bytes(&self) -> Result<Vec<u8, Global>, Error>
where
Self: Serialize,
{ ... }
fn try_to_ne_bytes(&self) -> Result<Vec<u8, Global>, Error>
where
Self: Serialize,
{ ... }
fn try_to_be_bytes_into(&self, writer: impl Write) -> Result<(), Error>
where
Self: Serialize,
{ ... }
fn try_to_le_bytes_into(&self, writer: impl Write) -> Result<(), Error>
where
Self: Serialize,
{ ... }
fn try_to_ne_bytes_into(&self, writer: impl Write) -> Result<(), Error>
where
Self: Serialize,
{ ... }
fn to_be_bytes(&self) -> Vec<u8, Global>
where
Self: Serialize,
{ ... }
fn to_le_bytes(&self) -> Vec<u8, Global>
where
Self: Serialize,
{ ... }
fn to_ne_bytes(&self) -> Vec<u8, Global>
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(bytes: impl AsRef<[u8]>) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn try_from_le_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn try_from_ne_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn try_from_be_bytes_from(reader: impl Read) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn try_from_le_bytes_from(reader: impl Read) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn try_from_ne_bytes_from(reader: impl Read) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn from_be_bytes(bytes: impl AsRef<[u8]>) -> Self
where
Self: DeserializeOwned,
{ ... }
fn from_le_bytes(bytes: impl AsRef<[u8]>) -> Self
where
Self: DeserializeOwned,
{ ... }
fn from_ne_bytes(bytes: impl AsRef<[u8]>) -> Self
where
Self: DeserializeOwned,
{ ... }
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, Global>, Error>
where
Self: Serialize,
{ ... }
fn try_to_bytes_into(&self, writer: impl Write) -> Result<(), Error>
where
Self: Serialize,
{ ... }
fn try_from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn try_from_bytes_from(reader: impl Read) -> Result<Self, Error>
where
Self: DeserializeOwned,
{ ... }
fn to_bytes(&self) -> Vec<u8, Global>
where
Self: Serialize,
{ ... }
fn to_bytes_into(&self, writer: impl Write)
where
Self: Serialize,
{ ... }
fn from_bytes(bytes: impl AsRef<[u8]>) -> Self
where
Self: DeserializeOwned,
{ ... }
fn from_bytes_from(reader: impl Read) -> Self
where
Self: DeserializeOwned,
{ ... }
}Provided Associated Constants§
const OPTIONS: ToBytesOptions = ToBytesOptions{..ToBytesOptions::default()}
Provided Methods§
sourcefn try_to_be_bytes(&self) -> Result<Vec<u8, Global>, Error>where
Self: Serialize,
fn try_to_be_bytes(&self) -> Result<Vec<u8, Global>, Error>where
Self: Serialize,
Serialize to bytes.
fn try_to_le_bytes(&self) -> Result<Vec<u8, Global>, Error>where
Self: Serialize,
fn try_to_ne_bytes(&self) -> Result<Vec<u8, Global>, Error>where
Self: Serialize,
fn try_to_be_bytes_into(&self, writer: impl Write) -> Result<(), Error>where
Self: Serialize,
fn try_to_le_bytes_into(&self, writer: impl Write) -> Result<(), Error>where
Self: Serialize,
fn try_to_ne_bytes_into(&self, writer: impl Write) -> Result<(), Error>where
Self: Serialize,
fn to_be_bytes(&self) -> Vec<u8, Global>where
Self: Serialize,
fn to_le_bytes(&self) -> Vec<u8, Global>where
Self: Serialize,
fn to_ne_bytes(&self) -> Vec<u8, Global>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(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where
Self: DeserializeOwned,
fn try_from_be_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where
Self: DeserializeOwned,
Deserialize from bytes.