Skip to main content

ObjectMeta

Struct ObjectMeta 

Source
pub struct ObjectMeta {
    pub draft: DraftVersion,
    pub stream_kind: DataStreamType,
    pub track_alias: Option<u64>,
    pub group_id: u64,
    pub subgroup_id: Option<u64>,
    pub object_id: u64,
    pub publisher_priority: Option<u8>,
    pub index_in_stream: u64,
    pub payload_len: u64,
    pub status: Option<u64>,
    pub end_of_range: Option<AnyFetchEndOfRange>,
}
Expand description

A framed object’s identity and framing, without its payload.

Every field is a primitive, so an observer never has to name a per-draft codec type to key on an object. Produced by ObjectFramer.

Fields§

§draft: DraftVersion

The draft this stream was parsed as.

§stream_kind: DataStreamType

Whether this object came from a subgroup or a fetch stream.

§track_alias: Option<u64>

Track alias from the stream header. None on fetch streams, whose headers carry a request ID instead.

§group_id: u64

Group ID: from the stream header on subgroup streams, from the object itself on fetch streams.

§subgroup_id: Option<u64>

Subgroup ID. None when the frame has none to report, which happens two ways. On a subgroup stream, when the stream type encodes an implicit subgroup ID that this draft never resolves — drafts 11 through 23 define a subgroup ID is the first object’s ID mode that the codec stores as zero, and reporting that zero would mis-key any matcher.

On a fetch stream, when the frame carried no Subgroup ID at all: from draft-15 a fetch object may be marked as having been forwarded over a datagram, which has no subgroup, and an End of Range indicator names a Location rather than an object. Both cases reach this crate as has_subgroup_id: false on the codec’s meta, behind a subgroup ID field that holds a placeholder — the same zero, and the same mis-keying if it were forwarded.

§object_id: u64

Absolute Object ID, resolved from delta encoding on drafts 14-23.

§publisher_priority: Option<u8>

Publisher priority. None when the header set a default-priority flag and omitted the field (drafts 15+).

§index_in_stream: u64

Zero-based index of this object within its stream.

§payload_len: u64

Declared payload length in bytes.

§status: Option<u64>

Object Status wire code; None when a non-empty payload followed.

§end_of_range: Option<AnyFetchEndOfRange>

Which indicator this frame is, or None for an object.

Drafts 16-23 let a fetch stream state that a run of Objects was not serialized instead of sending them, and draft-23 adds End of Group and End of Track, which say the Object before them ends its Group or the Track and carry that Object’s Location. These frames arrive through the same reader call as objects do. They are not objects: they carry no payload and no content, and one of them standing in a count of objects is a count that is wrong. An observer that means “objects” filters on this being None; one that means “frames” does not.

Always None on a subgroup stream, and on every fetch stream of drafts 07-15, which have no such frame.

Trait Implementations§

Source§

impl Clone for ObjectMeta

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ObjectMeta

Source§

impl Debug for ObjectMeta

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ObjectMeta

Source§

impl PartialEq for ObjectMeta

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ObjectMeta

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more