pub struct Raw<Out, In = <Out as Deref>::Target>(/* private fields */)
where
In: ToSql + ?Sized + ToOwned<Owned = Out>,
Out: ToSql + FromSql + Clone + Borrow<In>;Expand description
A plain SQL format, just serializing and deserializing raw sql types directly.
This is the easiest way of working with this library, and is a great choice for keys.
Trait Implementations§
Source§impl<Out, In> Format for Raw<Out, In>
impl<Out, In> Format for Raw<Out, In>
Source§type In = In
type In = In
The type that is passed into function calls, for insertion, checking, etc.
This type is serialized.
Source§type Buffer = Out
type Buffer = Out
An owned buffer, for serialization and deserialization. This is not
exposed to the user.
type SerializeError = Infallible
type DeserializeError = Infallible
Source§fn sql_type() -> &'static str
fn sql_type() -> &'static str
The column type. This is not a constant, because you might want to
query the SQLite version to select the best type for the version (for
instance, selecting ANY for a STRICT table only where it’s available,
and BLOB otherwise).
Source§fn serialize(object: &Self::In) -> Result<Self::Buffer, Self::SerializeError>
fn serialize(object: &Self::In) -> Result<Self::Buffer, Self::SerializeError>
Serialize a borrowed target into a buffer.
Source§fn deserialize(data: &Self::Buffer) -> Result<Self::Out, Self::DeserializeError>
fn deserialize(data: &Self::Buffer) -> Result<Self::Out, Self::DeserializeError>
Deserialize a target from a borrowed buffer.
Auto Trait Implementations§
impl<Out, In> Freeze for Raw<Out, In>where
In: ?Sized,
impl<Out, In> RefUnwindSafe for Raw<Out, In>
impl<Out, In> Send for Raw<Out, In>
impl<Out, In> Sync for Raw<Out, In>
impl<Out, In> Unpin for Raw<Out, In>
impl<Out, In> UnwindSafe for Raw<Out, In>
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