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>where In: ToSql + ?Sized + ToOwned<Owned = Out>, Out: ToSql + FromSql + Clone + Borrow<In>,

§

type Out = Out

The type that is returned from function calls. This type is deserialized.
§

type In = In

The type that is passed into function calls, for insertion, checking, etc. This type is serialized.
§

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

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>

Serialize a borrowed target into a buffer.
source§

fn deserialize(data: &Self::Buffer) -> Result<Self::Out, Self::DeserializeError>

Deserialize a target from a borrowed buffer.

Auto Trait Implementations§

§

impl<Out, In: ?Sized> RefUnwindSafe for Raw<Out, In>where In: RefUnwindSafe, Out: RefUnwindSafe,

§

impl<Out, In: ?Sized> Send for Raw<Out, In>where In: Send, Out: Send,

§

impl<Out, In: ?Sized> Sync for Raw<Out, In>where In: Sync, Out: Sync,

§

impl<Out, In: ?Sized> Unpin for Raw<Out, In>where In: Unpin, Out: Unpin,

§

impl<Out, In: ?Sized> UnwindSafe for Raw<Out, In>where In: UnwindSafe, Out: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.