pub struct Codec {
pub point: &'static str,
pub encode: EncodeFn,
pub decode: DecodeFn,
pub fresh: FreshFn,
}Expand description
How a relayable point’s input is written and read
(Relayed), its types erased, for a contract table
(PointDecl::relayable). Two codecs
are equal when they are for the same point.
Fields§
§point: &'static strThe point it is for (Point::ID): declare_all
refuses a codec on another point (Refused::TypeMismatch).
encode: EncodeFnWrites an input.
decode: DecodeFnReads one back.
fresh: FreshFnMakes the value each listener fills when an event relayed in is
delivered (Relay::ingest).
Implementations§
Trait Implementations§
impl Copy for Codec
impl Eq for Codec
Auto Trait Implementations§
impl Forget for Codec
impl Freeze for Codec
impl Move for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
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