pub(crate) struct K;
Expand description

The following is a very terrible hack that no one should draw inspiration from. Currently State is generic over <K, V, T, D>, with KVD being represented as phantom data for type safety and to detect persisted codec mismatches. However, reading persisted States does not require actually decoding KVD, so we only need their codec names to match, not the full types. For the purposes of persistcli inspect, which only wants to read the persistent data, we create new types that return static Codec names, and rebind the names if/when we get a CodecMismatch, so we can convince the type system and our safety checks that we really can read the data.

Trait Implementations

Name of the codec. Read more
Encode a key or value for permanent storage. Read more
Decode a key or value previous encoded with this codec’s Codec::encode. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more