Struct sqlite_collections::format::Parse
source · pub struct Parse<Out, In = Out>(/* private fields */)
where
In: ?Sized + ToString,
Out: FromStr,
<Out as FromStr>::Err: Error;Expand description
A format that uses ToString and FromStr to parse to and from a string representation.
This is a good choice if you have a type that has non-structured string serialization needs, like for Uuids or IP addresses.
Trait Implementations§
source§impl<Out, In> Format for Parse<Out, In>where
In: ?Sized + ToString,
Out: FromStr,
<Out as FromStr>::Err: Error,
impl<Out, In> Format for Parse<Out, In>where In: ?Sized + ToString, Out: FromStr, <Out as FromStr>::Err: Error,
§type In = In
type In = In
The type that is passed into function calls, for insertion, checking, etc.
This type is serialized.
§type Buffer = String
type Buffer = String
An owned buffer, for serialization and deserialization. This is not
exposed to the user.
type SerializeError = Infallible
type DeserializeError = <Out as FromStr>::Err
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: ?Sized> RefUnwindSafe for Parse<Out, In>where In: RefUnwindSafe, Out: RefUnwindSafe,
impl<Out, In: ?Sized> Send for Parse<Out, In>where In: Send, Out: Send,
impl<Out, In: ?Sized> Sync for Parse<Out, In>where In: Sync, Out: Sync,
impl<Out, In: ?Sized> Unpin for Parse<Out, In>where In: Unpin, Out: Unpin,
impl<Out, In: ?Sized> UnwindSafe for Parse<Out, In>where In: UnwindSafe, Out: 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