Struct mz_persist_types::codec_impls::SimpleSchema
source · pub struct SimpleSchema<X, T: Data>(PhantomData<(X, T)>);
Expand description
A helper for writing Schemas of a single column.
Tuple Fields§
§0: PhantomData<(X, T)>
Implementations§
source§impl<X, T: Data> SimpleSchema<X, T>
impl<X, T: Data> SimpleSchema<X, T>
sourcepub fn columns(cfg: &T::Cfg) -> DynStructCfg
pub fn columns(cfg: &T::Cfg) -> DynStructCfg
A helper for Schema::columns impls of a single column.
sourcepub fn decoder(
cols: ColumnsRef,
decode: for<'a> fn(_: T::Ref<'a>, _: &mut X),
) -> Result<SimpleDecoder<X, T>, String>
pub fn decoder( cols: ColumnsRef, decode: for<'a> fn(_: T::Ref<'a>, _: &mut X), ) -> Result<SimpleDecoder<X, T>, String>
A helper for Schema::decoder impls of a single column.
sourcepub fn encoder(
cols: ColumnsMut,
encode: for<'b> fn(_: &'b X) -> T::Ref<'b>,
) -> Result<SimpleEncoder<X, T>, String>
pub fn encoder( cols: ColumnsMut, encode: for<'b> fn(_: &'b X) -> T::Ref<'b>, ) -> Result<SimpleEncoder<X, T>, String>
A helper for Schema::encoder impls of a single column.
sourcepub fn push_encoder(
cols: ColumnsMut,
encode: fn(_: &mut T::Mut, _: &X),
) -> Result<SimpleEncoder<X, T>, String>
pub fn push_encoder( cols: ColumnsMut, encode: fn(_: &mut T::Mut, _: &X), ) -> Result<SimpleEncoder<X, T>, String>
A helper for Schema::encoder impls of a single column.
Auto Trait Implementations§
impl<X, T> Freeze for SimpleSchema<X, T>
impl<X, T> RefUnwindSafe for SimpleSchema<X, T>where
X: RefUnwindSafe,
T: RefUnwindSafe,
impl<X, T> Send for SimpleSchema<X, T>where
X: Send,
impl<X, T> Sync for SimpleSchema<X, T>where
X: Sync,
impl<X, T> Unpin for SimpleSchema<X, T>
impl<X, T> UnwindSafe for SimpleSchema<X, T>where
X: UnwindSafe,
T: 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
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.