pub enum ObjectType {
Show 23 variants
Commit = 1,
Tree = 2,
Blob = 3,
Tag = 4,
OffsetZstdelta = 5,
OffsetDelta = 6,
HashDelta = 7,
ContextSnapshot = 8,
Decision = 9,
Evidence = 10,
PatchSet = 11,
Plan = 12,
Provenance = 13,
Run = 14,
Task = 15,
Intent = 16,
ToolInvocation = 17,
ContextFrame = 18,
IntentEvent = 19,
TaskEvent = 20,
RunEvent = 21,
PlanStepEvent = 22,
RunUsage = 23,
}Expand description
Canonical object kind shared across Git-native and AI-native objects.
The first seven variants mirror Git pack semantics. The remaining variants describe the application’s AI workflow objects.
Variants§
Commit = 1
A Git commit object.
Tree = 2
A Git tree object.
Blob = 3
A Git blob object.
Tag = 4
A Git tag object.
OffsetZstdelta = 5
A pack entry encoded as a zstd-compressed offset delta.
OffsetDelta = 6
A pack entry encoded as an offset delta.
HashDelta = 7
A pack entry encoded as a reference delta.
ContextSnapshot = 8
A captured slice of conversational or execution context.
Decision = 9
A recorded decision made by an agent or system.
Evidence = 10
Supporting evidence attached to a decision or plan.
PatchSet = 11
A persisted set of file or content changes.
Plan = 12
A multi-step plan derived from an intent.
Provenance = 13
Provenance metadata for generated outputs or workflow state.
Run = 14
A concrete run/execution of an agent workflow.
Task = 15
A task belonging to a run or plan.
Intent = 16
An immutable revision of the user’s request.
ToolInvocation = 17
A persisted record of a tool call.
ContextFrame = 18
A frame of structured context injected into execution.
IntentEvent = 19
A lifecycle event attached to an intent.
TaskEvent = 20
A lifecycle event attached to a task.
RunEvent = 21
A lifecycle event attached to a run.
PlanStepEvent = 22
A lifecycle event attached to an individual plan step.
RunUsage = 23
Usage/accounting information recorded for a run.
Implementations§
Source§impl ObjectType
impl ObjectType
Sourcepub fn to_pack_type_u8(&self) -> Result<u8, GitError>
pub fn to_pack_type_u8(&self) -> Result<u8, GitError>
Convert to the 3-bit pack header type used by Git pack entries.
Only Git-native base objects and delta encodings are valid in this space. AI objects do not have a pack-header representation.
Sourcepub fn from_pack_type_u8(number: u8) -> Result<ObjectType, GitError>
pub fn from_pack_type_u8(number: u8) -> Result<ObjectType, GitError>
Parse a Git pack header type number into an ObjectType.
Sourcepub fn to_bytes(&self) -> Option<&[u8]>
pub fn to_bytes(&self) -> Option<&[u8]>
Return the canonical borrowed byte label for named object types.
Delta entries return None because they are represented by pack
type bits rather than textual object names.
Sourcepub fn from_string(s: &str) -> Result<ObjectType, GitError>
pub fn from_string(s: &str) -> Result<ObjectType, GitError>
Parse the canonical textual object name used in persisted data.
Sourcepub fn to_data(self) -> Result<Vec<u8>, GitError>
pub fn to_data(self) -> Result<Vec<u8>, GitError>
Return the canonical textual object name as owned bytes.
This is the owned allocation counterpart to to_bytes().
Sourcepub fn to_u8(&self) -> u8
pub fn to_u8(&self) -> u8
Convert to the crate-local stable numeric identifier.
Unlike pack type bits, this mapping covers every variant in the enum, including AI object kinds.
Sourcepub fn from_u8(number: u8) -> Result<ObjectType, GitError>
pub fn from_u8(number: u8) -> Result<ObjectType, GitError>
Parse the crate-local stable numeric identifier.
Sourcepub fn is_ai_object(&self) -> bool
pub fn is_ai_object(&self) -> bool
Return true when the type belongs to the AI object family.
Trait Implementations§
Source§impl Clone for ObjectType
impl Clone for ObjectType
Source§fn clone(&self) -> ObjectType
fn clone(&self) -> ObjectType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObjectType
impl Debug for ObjectType
Source§impl<'de> Deserialize<'de> for ObjectType
impl<'de> Deserialize<'de> for ObjectType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ObjectType
impl Display for ObjectType
Source§impl Hash for ObjectType
impl Hash for ObjectType
Source§impl PartialEq for ObjectType
impl PartialEq for ObjectType
Source§impl Serialize for ObjectType
impl Serialize for ObjectType
impl Copy for ObjectType
impl Eq for ObjectType
impl StructuralPartialEq for ObjectType
Auto Trait Implementations§
impl Freeze for ObjectType
impl RefUnwindSafe for ObjectType
impl Send for ObjectType
impl Sync for ObjectType
impl Unpin for ObjectType
impl UnsafeUnpin for ObjectType
impl UnwindSafe for ObjectType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FileLoadStore for Twhere
T: Serialize + for<'a> Deserialize<'a>,
impl<T> FileLoadStore for Twhere
T: Serialize + for<'a> Deserialize<'a>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more