pub type ItemizedPage<T> = Page<<T as Config>::MaxItemizedPageSizeBytes>;Expand description
Itemized page type
Aliased Type§
struct ItemizedPage<T> {
pub page_version: PageVersion,
pub schema_id: Option<u16>,
pub nonce: u16,
pub data: BoundedVec<u8, <T as Config>::MaxItemizedPageSizeBytes>,
}Fields§
§page_version: PageVersionPage “header” version This field should always be first in the page as the structure evolves, so pallet reads can adapt to evolving page structure.
schema_id: Option<u16>SchemaId used to serialize this page’s data.
Use None for Itemized pages (schema_id will be per-item)
nonce: u16Incremental nonce to eliminate of signature replay attacks
data: BoundedVec<u8, <T as Config>::MaxItemizedPageSizeBytes>Data for the page
- Itemized is limited by
Config::MaxItemizedPageSizeBytes - Paginated is limited by
Config::MaxPaginatedPageSizeBytes
Trait Implementations§
Source§impl<T: Config> ItemizedOperations<T> for ItemizedPage<T>
impl<T: Config> ItemizedOperations<T> for ItemizedPage<T>
Source§fn apply_item_actions(
&self,
schema_id: SchemaId,
actions: &[ItemAction<T::MaxItemizedBlobSizeBytes>],
) -> Result<ItemizedPage<T>, PageError>
fn apply_item_actions( &self, schema_id: SchemaId, actions: &[ItemAction<T::MaxItemizedBlobSizeBytes>], ) -> Result<ItemizedPage<T>, PageError>
Applies all actions to specified page and returns the updated page This has O(n) complexity when n is the number of all the bytes in that itemized storage