Skip to main content

DecodedPropertyLayer

Struct DecodedPropertyLayer 

Source
pub struct DecodedPropertyLayer {
    pub layer_id: u64,
    pub name: String,
    pub id_family: IdFamily,
    pub role: LayerRole,
    pub storage: StorageMode,
    pub logical_len: usize,
    pub data: DecodedPropertyData,
}
Expand description

One property layer decoded from snapshot bytes.

Returned by DecodedPropertyLayer::decode_all and DecodedPropertyLayer::decode_sections. Field types mirror the descriptor record without exposing the wire word width, so callers can introspect the layer without referencing PropertySnapshotMetaWord directly.

§Performance

Cloning is O(name bytes) (the Arrow payload clones in O(1)).

Fields§

§layer_id: u64

Stable layer ID as decoded from the descriptor record.

§name: String

Layer name decoded from the descriptor string table.

§id_family: IdFamily

ID family the layer is keyed by.

§role: LayerRole

Layer role tag.

§storage: StorageMode

Storage mode (carrying the sparse missing policy when applicable).

§logical_len: usize

Logical layer length declared by the descriptor record.

§data: DecodedPropertyData

Arrow payload decoded from the layer’s IPC value (and optional default) stream.

Implementations§

Source§

impl DecodedPropertyLayer

Source

pub fn decode_all<W>( snapshot: &Snapshot<'_>, ) -> Result<Vec<Self>, PropertyError>

Decodes every property layer carried by a snapshot.

Mirrors BcsrSnapshotHypergraph::from_snapshot on the topology side: a single constructor on the decoded type that takes the wire snapshot and returns the materialized form. Each layer is returned in descriptor order with its Arrow payload restored via arrow_ipc::reader::StreamReader.

Calls validate_property_snapshot before decoding so the diagnostics match the validator exactly.

§Errors

Returns PropertyError if required sections are missing, have an unsupported version, or contain inconsistent descriptor/data records.

§Performance

O(s + l + total Arrow IPC payload bytes) for snapshot section count s and property layer count l.

Source

pub fn decode_sections<W>( descriptor_bytes: &[u8], data_bytes: &[u8], ) -> Result<Vec<Self>, PropertyError>

Decodes property layers from raw descriptor and data section payloads.

Lower-level entry point for callers that already have the two section byte slices in hand (e.g. when reassembling property data from a custom container). Re-runs validate_property_sections so structural errors surface with identical diagnostics.

§Errors

Returns PropertyError if the encoded payloads are structurally invalid.

§Performance

O(l + total Arrow IPC payload bytes + total name bytes) for layer count l.

Trait Implementations§

Source§

impl Clone for DecodedPropertyLayer

Source§

fn clone(&self) -> DecodedPropertyLayer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DecodedPropertyLayer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.