#[repr(transparent)]pub struct Serializable<T>(pub T)
where
T: SerializerT + DeserializerT;
Tuple Fields§
§0: T
Implementations§
Source§impl<T> Serializable<T>where
T: SerializerT + DeserializerT,
impl<T> Serializable<T>where
T: SerializerT + DeserializerT,
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<T> AsRef<T> for Serializable<T>where
T: SerializerT + DeserializerT,
impl<T> AsRef<T> for Serializable<T>where
T: SerializerT + DeserializerT,
Source§impl<T> BorshDeserialize for Serializable<T>where
T: SerializerT + DeserializerT,
impl<T> BorshDeserialize for Serializable<T>where
T: SerializerT + DeserializerT,
fn deserialize_reader<R: Read>(source: &mut R) -> Result<Self>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<T> BorshSerialize for Serializable<T>where
T: SerializerT + DeserializerT,
impl<T> BorshSerialize for Serializable<T>where
T: SerializerT + DeserializerT,
Source§impl<T> Debug for Serializable<T>
impl<T> Debug for Serializable<T>
Source§impl<T> Deref for Serializable<T>where
T: SerializerT + DeserializerT,
impl<T> Deref for Serializable<T>where
T: SerializerT + DeserializerT,
Source§impl<'de, T> Deserialize<'de> for Serializable<T>
impl<'de, T> Deserialize<'de> for Serializable<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> From<T> for Serializable<T>where
T: SerializerT + DeserializerT,
impl<T> From<T> for Serializable<T>where
T: SerializerT + DeserializerT,
Source§impl<T> Serialize for Serializable<T>
impl<T> Serialize for Serializable<T>
Auto Trait Implementations§
impl<T> Freeze for Serializable<T>where
T: Freeze,
impl<T> RefUnwindSafe for Serializable<T>where
T: RefUnwindSafe,
impl<T> Send for Serializable<T>
impl<T> Sync for Serializable<T>
impl<T> Unpin for Serializable<T>where
T: Unpin,
impl<T> UnwindSafe for Serializable<T>where
T: UnwindSafe,
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