pub enum DetachedMetadata {
Dict(Value),
Encoded(Vec<u8>),
}Expand description
The detached metadata of a commit, as an ObjectSource gives it.
ObjectSource::detached_metadata_encoded returns it. The session
serializes a Dict on the blocking pool of
ostrya-rt. Under the tokio backend, this pool is the blocking pool of
the tokio runtime, so the serialization panics outside a tokio runtime
context.
If a dict does not serialize as a{sv}, the object stream stops with
Error::InvalidInput. If the bytes of either form are more than 128 MiB
(MAX_METADATA_SIZE), the object stream
also stops with Error::InvalidInput. An ostrya server refuses bytes
that are not a normal-form a{sv} dict with the code protocol.
Variants§
Dict(Value)
An a{sv} dict, which the session serializes.
Encoded(Vec<u8>)
The bytes of an a{sv} dict in normal form.
The session sends the bytes as they are, and checks only their length.