pub trait ProductionReadSession {
// Required methods
fn read(&self) -> &dyn ProductionRead;
fn decision_base(&self) -> DecisionBase;
// Provided methods
fn assets(
&self,
page_size: u32,
) -> Result<impl Iterator<Item = Result<Asset>> + '_>
where Self: Sized { ... }
fn revisions(
&self,
after: u64,
page_size: u32,
) -> Result<impl Iterator<Item = Result<Revision>> + '_>
where Self: Sized { ... }
fn edit<'production, Store: ProductionStore>(
&self,
store: &'production mut Store,
) -> Result<Store::Transaction<'production>> { ... }
}Expand description
An owned coherent production view with a base captured by the same read.
Required Methods§
Sourcefn read(&self) -> &dyn ProductionRead
fn read(&self) -> &dyn ProductionRead
Returns only domain read operations on the retained view.
Sourcefn decision_base(&self) -> DecisionBase
fn decision_base(&self) -> DecisionBase
Detaches the view’s production-scoped decision context.
Provided Methods§
Sourcefn assets(
&self,
page_size: u32,
) -> Result<impl Iterator<Item = Result<Asset>> + '_>where
Self: Sized,
fn assets(
&self,
page_size: u32,
) -> Result<impl Iterator<Item = Result<Asset>> + '_>where
Self: Sized,
Scans all assets in this coherent view using bounded, lazy pages.
The iterator borrows the view; copied assets may outlive it. A backend error is returned once, then the iterator ends. Dropping the iterator stops traversal without closing the caller-owned view. There is no total-result cap or hidden connection.
§Errors
Rejects page sizes outside 1..=1000 before returning an iterator.
Individual items preserve errors from the underlying page operation.
Sourcefn revisions(
&self,
after: u64,
page_size: u32,
) -> Result<impl Iterator<Item = Result<Revision>> + '_>where
Self: Sized,
fn revisions(
&self,
after: u64,
page_size: u32,
) -> Result<impl Iterator<Item = Result<Revision>> + '_>where
Self: Sized,
Scans revisions after after, in ascending order within this view.
Page size bounds memory, not the number of revisions. The iterator borrows the view and ends after a backend error, returning that error unchanged. It observes the retained history, not future writes.
§Errors
Rejects page sizes outside 1..=1000 before returning an iterator.
Individual items preserve errors from the underlying history operation.
Sourcefn edit<'production, Store: ProductionStore>(
&self,
store: &'production mut Store,
) -> Result<Store::Transaction<'production>>
fn edit<'production, Store: ProductionStore>( &self, store: &'production mut Store, ) -> Result<Store::Transaction<'production>>
Begins an edit carrying this view’s decision base automatically.
The store owns a fresh write transaction, not an upgraded read view.
§Errors
Rejects wrong production scope, invalid revisions or storage failures.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".