Skip to main content

ProceduralIndex

Struct ProceduralIndex 

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

Procedural index for sessions and workflows.

Implementations§

Source§

impl ProceduralIndex

Source

pub fn new() -> Self

Source

pub fn get_session(&self, session_id: &str) -> Vec<IndexResult>

Get all blocks in a session, in order

Source

pub fn get_current_session(&self) -> Vec<IndexResult>

Get current session blocks

Source

pub fn current_session_id(&self) -> &str

Get current session ID

Source

pub fn get_sessions(&self) -> Vec<String>

Get all session IDs

Source

pub fn get_recent_steps(&self, n: usize) -> Vec<IndexResult>

Get the last N blocks in current session

Source

pub fn start_workflow(&mut self, name: &str, start_sequence: u64) -> String

Start a new workflow

Source

pub fn end_workflow(&mut self, workflow_id: &str, end_sequence: u64)

End a workflow

Source

pub fn add_workflow_step( &mut self, sequence: u64, step_type: &str, description: &str, )

Add step to current workflow

Source

pub fn get_workflow(&self, workflow_id: &str) -> Option<&Workflow>

Get workflow by ID

Source

pub fn get_all_workflows(&self) -> &[Workflow]

Get all workflows

Trait Implementations§

Source§

impl Default for ProceduralIndex

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Index for ProceduralIndex

Source§

fn index(&mut self, block: &Block)

Add a block to the index
Source§

fn remove(&mut self, sequence: u64)

Remove a block from the index (for reindexing only)
Source§

fn rebuild(&mut self, blocks: impl Iterator<Item = Block>)

Rebuild entire index from blocks

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.