Struct persist::gen::persist::ProtoMeta[][src]

pub struct ProtoMeta {
    pub version: String,
    pub seqno: u64,
    pub id_mapping: HashMap<u64, ProtoStreamRegistration>,
    pub graveyard: HashMap<u64, ProtoStreamRegistration>,
    pub arrangements: HashMap<u64, ProtoArrangement>,
}

Fields

version: String

For data written by some vX.Y.Z of Materialize, we’ll support reading it back in by later versions (backward compatibility, so users can upgrade) and earlier versions (forward compatiblity, so users can roll back an upgrade). The specific policy is yet to be determined, but each of these is likely to be bounded, especially forward compatatibility.

For us to reason about this (e.g. to prevent startup if a binary is pointed at data it can’t handle), we store the version that wrote data alongside the data itself.

seqno: u64id_mapping: HashMap<u64, ProtoStreamRegistration>graveyard: HashMap<u64, ProtoStreamRegistration>arrangements: HashMap<u64, ProtoArrangement>

Implementations

A versioning for how we store the protobuf serialization.

Protobuf handles most of our backward and forward compatibility, but we don’t just store the raw protobuf message serialization. This version number determines the exactly what that format is.

Once we commit to backward compatibility, this should only change if we decide to e.g. switch from protobuf to some other encoding entirely.

All versions less than this were developmental. If encountered, it’s safe to delete all data in blob storage. If a greater version is seen, then some major change has happened and this code has no idea what is going on and should refuse to touch it.

The following is an EBNF-ish spec for the format:

encoding = 9u8 v9_encoding
v9_encoding = proto_meta md5_checksum
proto_meta = u8* (the protobuf serialization of ProtoMeta)
md5_checksum = u8 u8 u8 u8 (little endian, md5 of proto_meta)

The Self::ENCODING_VERSION of this previously encoded ProtoMeta.

Returns an error if the input is malformed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

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

Performs the conversion.

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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