pub struct ComponentDescriptor {
pub id: ComponentId,
pub name: &'static str,
pub storage: ComponentStorageKind,
pub sync: ComponentSyncMode,
pub migration: ComponentMigrationMode,
pub max_bytes: usize,
pub schema_hash: u64,
}Expand description
Registered component descriptor.
Fields§
§id: ComponentIdComponent id used in hot-path records.
name: &'static strStable debug name.
storage: ComponentStorageKindStorage strategy.
sync: ComponentSyncModeSynchronization strategy.
migration: ComponentMigrationModeMigration strategy.
max_bytes: usizeMaximum accepted blob size in bytes for SectorSync-owned storage.
schema_hash: u64Stable schema hash selected by the embedding application.
Implementations§
Source§impl ComponentDescriptor
impl ComponentDescriptor
Sourcepub const fn sparse_blob(
id: ComponentId,
name: &'static str,
sync: ComponentSyncMode,
migration: ComponentMigrationMode,
max_bytes: usize,
) -> Self
pub const fn sparse_blob( id: ComponentId, name: &'static str, sync: ComponentSyncMode, migration: ComponentMigrationMode, max_bytes: usize, ) -> Self
Creates a sparse blob descriptor.
Sourcepub const fn with_schema_hash(self, schema_hash: u64) -> Self
pub const fn with_schema_hash(self, schema_hash: u64) -> Self
Attaches a stable schema hash to this descriptor.
Trait Implementations§
Source§impl Clone for ComponentDescriptor
impl Clone for ComponentDescriptor
Source§fn clone(&self) -> ComponentDescriptor
fn clone(&self) -> ComponentDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComponentDescriptor
impl Debug for ComponentDescriptor
impl Eq for ComponentDescriptor
Source§impl PartialEq for ComponentDescriptor
impl PartialEq for ComponentDescriptor
impl StructuralPartialEq for ComponentDescriptor
Auto Trait Implementations§
impl Freeze for ComponentDescriptor
impl RefUnwindSafe for ComponentDescriptor
impl Send for ComponentDescriptor
impl Sync for ComponentDescriptor
impl Unpin for ComponentDescriptor
impl UnsafeUnpin for ComponentDescriptor
impl UnwindSafe for ComponentDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more