pub struct TimestampCodec { /* private fields */ }Expand description
Configured local format and IANA timezone, normalized to UTC for binding. Ambiguous and nonexistent local DST times are errors. RFC 3339 and epoch milliseconds are accepted as explicit instants, independent of local zone.
Implementations§
Source§impl TimestampCodec
impl TimestampCodec
pub fn new( name: &'static str, field: &'static str, format: &'static str, timezone: &str, ) -> Result<TimestampCodec, ConfigError>
Trait Implementations§
Source§impl Clone for TimestampCodec
impl Clone for TimestampCodec
Source§fn clone(&self) -> TimestampCodec
fn clone(&self) -> TimestampCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Codec for TimestampCodec
impl Codec for TimestampCodec
Source§fn parse(&self, _: &FieldMeta, input: &str) -> Result<ScalarValue, String>
fn parse(&self, _: &FieldMeta, input: &str) -> Result<ScalarValue, String>
Convert one external value into the field’s validated query value.
Source§fn format_result(
&self,
_: &FieldMeta,
value: RowValue,
) -> Result<RowValue, String>
fn format_result( &self, _: &FieldMeta, value: RowValue, ) -> Result<RowValue, String>
Convert one decoded result value into its public representation.
Source§fn format_input(
&self,
_: &FieldMeta,
value: &ScalarValue,
) -> Result<String, String>
fn format_input( &self, _: &FieldMeta, value: &ScalarValue, ) -> Result<String, String>
Canonical RPC representation. Encoders verify that parsing this text
recovers the original database value; lossy codecs must override it.
Source§fn fingerprint(&self) -> u64
fn fingerprint(&self) -> u64
Stable identity including codec configuration.
Auto Trait Implementations§
impl Freeze for TimestampCodec
impl RefUnwindSafe for TimestampCodec
impl Send for TimestampCodec
impl Sync for TimestampCodec
impl Unpin for TimestampCodec
impl UnsafeUnpin for TimestampCodec
impl UnwindSafe for TimestampCodec
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,
impl<T> FieldConvertor for T
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