Skip to main content

ItemView

Trait ItemView 

Source
pub trait ItemView {
    // Required methods
    fn kind(&self) -> ItemKind;
    fn parts(&self) -> &[Part];
    fn metadata(&self) -> &MetadataMap;
}
Expand description

Read-only view over an Item’s essential fields.

This trait lets downstream crates (compaction, reporting) operate on item-like types without depending on the concrete Item struct.

Required Methods§

Source

fn kind(&self) -> ItemKind

Returns the role of this item.

Source

fn parts(&self) -> &[Part]

Returns the content parts.

Source

fn metadata(&self) -> &MetadataMap

Returns the metadata map.

Implementors§