Skip to main content

Scopeable

Trait Scopeable 

Source
pub trait Scopeable {
    type Id: Clone + Serialize + for<'de> Deserialize<'de>;

    // Required methods
    fn id(&self) -> Self::Id;
    fn summary(&self) -> String;
    fn full_token_estimate(&self) -> u64;
}
Expand description

Trait for types that can be scoped to different extraction intents.

Required Associated Types§

Source

type Id: Clone + Serialize + for<'de> Deserialize<'de>

The identifier type for this object.

Required Methods§

Source

fn id(&self) -> Self::Id

Return just the identifier.

Source

fn summary(&self) -> String

Return a summary representation (as JSON-friendly string).

Source

fn full_token_estimate(&self) -> u64

Estimated token count for the full representation.

Implementors§