pub struct Scope {
pub scope_id: ScopeId,
pub trajectory_id: TrajectoryId,
pub parent_scope_id: Option<ScopeId>,
pub name: String,
pub purpose: Option<String>,
pub is_active: bool,
pub created_at: DateTime<Utc>,
pub closed_at: Option<DateTime<Utc>>,
pub checkpoint: Option<Checkpoint>,
pub token_budget: i32,
pub tokens_used: i32,
pub metadata: Option<Value>,
}Expand description
Scope - partitioned context window within a trajectory. Scopes provide isolation and checkpointing boundaries.
Fields§
§scope_id: ScopeId§trajectory_id: TrajectoryId§parent_scope_id: Option<ScopeId>§name: String§purpose: Option<String>§is_active: bool§created_at: DateTime<Utc>§closed_at: Option<DateTime<Utc>>§checkpoint: Option<Checkpoint>§token_budget: i32§tokens_used: i32§metadata: Option<Value>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scope
impl<'de> Deserialize<'de> for Scope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Scope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Scope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EventSourced for Scope
impl EventSourced for Scope
Source§fn from_events(events: &[Event<Value>]) -> Option<Scope>
fn from_events(events: &[Event<Value>]) -> Option<Scope>
Reconstruct entity state from a sequence of events. Read more
Source§fn apply_event(&mut self, event: &Event<Value>)
fn apply_event(&mut self, event: &Event<Value>)
Apply a single event to update state (used for incremental updates).
Source§fn relevant_event_kinds() -> &'static [EventKind]
fn relevant_event_kinds() -> &'static [EventKind]
The event kinds this entity cares about.
Source§impl Serialize for Scope
impl Serialize for Scope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more