Skip to main content

CognitiveContainer

Struct CognitiveContainer 

Source
pub struct CognitiveContainer { /* private fields */ }
Expand description

A sealed cognitive container that orchestrates ingest, min-cut, spectral, evidence, and witness phases within a memory slab and epoch budget.

Implementations§

Source§

impl CognitiveContainer

Source

pub fn new(config: ContainerConfig) -> Result<Self>

Create and initialize a new container.

Source

pub fn tick(&mut self, deltas: &[Delta]) -> Result<TickResult>

Execute one full epoch: ingest deltas, recompute min-cut, update spectral metrics, accumulate evidence, and produce a witness receipt.

Source

pub fn config(&self) -> &ContainerConfig

Reference to the container configuration.

Source

pub fn current_epoch(&self) -> u64

Current epoch counter (next epoch to be generated).

Source

pub fn receipt_chain(&self) -> &[ContainerWitnessReceipt]

Slice of all retained witness receipts.

Source

pub fn verify_chain(&self) -> VerificationResult

Verify the integrity of the internal witness chain.

Source

pub fn snapshot(&self) -> ContainerSnapshot

Produce a serializable snapshot of the current container state.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.