pub struct StringCodec;Expand description
Identity codec for String keys and values stored in TEXT columns.
Trait Implementations§
Source§impl Clone for StringCodec
impl Clone for StringCodec
impl Copy for StringCodec
Source§impl Debug for StringCodec
impl Debug for StringCodec
Source§impl Default for StringCodec
impl Default for StringCodec
Source§impl PostgresCodec<String, String> for StringCodec
impl PostgresCodec<String, String> for StringCodec
Source§type EncodedKey = String
type EncodedKey = String
PostgreSQL representation of the key column.Source§type EncodedValue = String
type EncodedValue = String
PostgreSQL representation of the value column.Source§fn encode_key(
&self,
key: &String,
) -> Result<Self::EncodedKey, PostgresBackendError>
fn encode_key( &self, key: &String, ) -> Result<Self::EncodedKey, PostgresBackendError>
Encodes a typed key. Read more
Source§fn encode_value(
&self,
value: &String,
) -> Result<Self::EncodedValue, PostgresBackendError>
fn encode_value( &self, value: &String, ) -> Result<Self::EncodedValue, PostgresBackendError>
Encodes a typed value. Read more
Source§fn decode_value(
&self,
value: Self::EncodedValue,
) -> Result<String, PostgresBackendError>
fn decode_value( &self, value: Self::EncodedValue, ) -> Result<String, PostgresBackendError>
Decodes a typed value. Read more
Auto Trait Implementations§
impl Freeze for StringCodec
impl RefUnwindSafe for StringCodec
impl Send for StringCodec
impl Sync for StringCodec
impl Unpin for StringCodec
impl UnsafeUnpin for StringCodec
impl UnwindSafe for StringCodec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more