pub struct TypeMap<Src: WireSource, S, B> { /* private fields */ }Expand description
Generic type-to-decoder registry.
Keyed by Src::TypeKey (the wire’s native type identity: Oid for
pg_walstream, Arc<str> for wal2json and maxwell). Implements
WireAdapter via a single HashMap::get per column.
Implementations§
Source§impl<Src: WireSource, S, B> TypeMap<Src, S, B>
impl<Src: WireSource, S, B> TypeMap<Src, S, B>
Sourcepub fn register<D>(&mut self, key: Src::TypeKey, decoder: D) -> &mut Self
pub fn register<D>(&mut self, key: Src::TypeKey, decoder: D) -> &mut Self
Register (or replace) the decoder for key. Returns &mut self
for chaining.
Trait Implementations§
Source§impl<Src: WireSource, S, B> Default for TypeMap<Src, S, B>
impl<Src: WireSource, S, B> Default for TypeMap<Src, S, B>
Source§impl<Src: WireSource, S, B> WireAdapter<Src, S, B> for TypeMap<Src, S, B>
impl<Src: WireSource, S, B> WireAdapter<Src, S, B> for TypeMap<Src, S, B>
Auto Trait Implementations§
impl<Src, S, B> !RefUnwindSafe for TypeMap<Src, S, B>
impl<Src, S, B> !UnwindSafe for TypeMap<Src, S, B>
impl<Src, S, B> Freeze for TypeMap<Src, S, B>
impl<Src, S, B> Send for TypeMap<Src, S, B>
impl<Src, S, B> Sync for TypeMap<Src, S, B>
impl<Src, S, B> Unpin for TypeMap<Src, S, B>
impl<Src, S, B> UnsafeUnpin for TypeMap<Src, S, B>
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