Raw

Struct Raw 

Source
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>,

Source§

type Out = Out

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

type In = In

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

type Buffer = Out

An owned buffer, for serialization and deserialization. This is not exposed to the user.
Source§

type SerializeError = Infallible

Source§

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> Freeze for Raw<Out, In>
where In: ?Sized,

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.