bookclerk_library::entities::storage_scan_generations

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

Ownership row for one durable storage-scan generation.

storage_scan_rows are keyed only by scan_id. This row binds that id to the storage instance and, when the scan runs inside a job, the job that owns it. Cleanup uses the row to tell a live scan from an abandoned one.

Item Kind Summary
Model struct One scan generation.
ColumnIter struct An iterator over the variants of [Column]
Entity struct Generated by sea-orm-macros
PrimaryKeyIter struct An iterator over the variants of [PrimaryKey]
ActiveModel struct Generated by sea-orm-macros
RelationIter struct An iterator over the variants of [Relation]
Column enum Generated by sea-orm-macros
PrimaryKey enum Generated by sea-orm-macros
Relation enum No declared relations.

Structs

Model

pub struct Model {
    pub scan_id: String,
    pub instance_id: String,
    pub job_id: String,
    pub updated_at: String,
    pub completed: i64,
}

One scan generation.

Fields

  • scan_id: Globally unique scan id.
  • instance_id: Storage instance id (StorageBackend::instance_id) this generation lists.
  • job_id: Job id when the scan is fenced. Empty when the scan has no job.
  • updated_at: RFC 3339 heartbeat. Page ingestion updates this.
  • completed: 1 after the list phase finished and the inventory can be adopted.

Model::into_ex

pub fn into_ex(self) -> Self

Generated by sea-orm-macros

Implements: Clone, Debug, Eq, From<Model>, FromQueryResult, IntoActiveModel<ActiveModel>, ModelTrait, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

ColumnIter

pub struct ColumnIter {
    /* private fields */
}

An iterator over the variants of Column

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Entity

pub struct Entity;

Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic

PrimaryKeyIter

pub struct PrimaryKeyIter {
    /* private fields */
}

An iterator over the variants of PrimaryKey

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

ActiveModel

pub struct ActiveModel {
    pub scan_id: ActiveValue<String>,
    pub instance_id: ActiveValue<String>,
    pub job_id: ActiveValue<String>,
    pub updated_at: ActiveValue<String>,
    pub completed: ActiveValue<i64>,
}

Generated by sea-orm-macros

Fields

  • scan_id: Generated by sea-orm-macros
  • instance_id: Generated by sea-orm-macros
  • job_id: Generated by sea-orm-macros
  • updated_at: Generated by sea-orm-macros
  • completed: Generated by sea-orm-macros

Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

RelationIter

pub struct RelationIter {
    /* private fields */
}

An iterator over the variants of Relation

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Enums

Column

pub enum Column {
    ScanId,
    InstanceId,
    JobId,
    UpdatedAt,
    Completed,
}

Generated by sea-orm-macros

Variants

  • ScanId: Generated by sea-orm-macros
  • InstanceId: Generated by sea-orm-macros
  • JobId: Generated by sea-orm-macros
  • UpdatedAt: Generated by sea-orm-macros
  • Completed: Generated by sea-orm-macros

Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator

PrimaryKey

pub enum PrimaryKey {
    ScanId,
}

Generated by sea-orm-macros

Variants

  • ScanId: Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait

Relation

pub enum Relation {}

No declared relations.

Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait

Generated from crates/bookclerk-library at main · View as Markdown