Skip to main content

KernelGraphStore

Struct KernelGraphStore 

Source
pub struct KernelGraphStore<B: MemoryBacking> { /* private fields */ }
Expand description

Kernel-resident graph store.

Implements the graph_apply_proved syscall interface.

Implementations§

Source§

impl<B: MemoryBacking> KernelGraphStore<B>

Source

pub fn new( node_backing: B, edge_backing: B, witness_backing: B, node_handle: RegionHandle, edge_handle: RegionHandle, witness_handle: RegionHandle, capacity: u32, coherence_config: CoherenceConfig, proof_policy: ProofPolicy, partition_count: u32, store_id: u32, ) -> Result<Self>

Creates a new kernel graph store.

Source

pub const fn handle(&self) -> GraphHandle

Returns the store handle.

Source

pub fn node_count(&self) -> usize

Returns the number of nodes.

Source

pub const fn edge_count(&self) -> u32

Returns the number of edges.

Source

pub const fn capacity(&self) -> u32

Returns the capacity.

Source

pub const fn partition_meta(&self) -> &PartitionMeta

Returns the partition metadata.

Source

pub fn graph_apply_proved( &mut self, mutation: &GraphMutation, proof: &ProofToken, capability: &Capability, current_time_ns: u64, ) -> Result<GraphMutationResult>

Implements the graph_apply_proved syscall.

Applies a graph mutation with proof verification. Requires PROVE right on the capability.

§Arguments
  • mutation - The graph mutation to apply
  • proof - The proof token authorizing the mutation
  • capability - Capability authorizing the mutation
  • current_time_ns - Current time for proof verification
§Returns

A mutation result including the attestation.

Source

pub const fn proof_policy(&self) -> &ProofPolicy

Returns the proof policy.

Source

pub fn witness_entry_count(&self) -> usize

Returns witness log statistics.

Auto Trait Implementations§

§

impl<B> Freeze for KernelGraphStore<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for KernelGraphStore<B>
where B: RefUnwindSafe,

§

impl<B> !Send for KernelGraphStore<B>

§

impl<B> !Sync for KernelGraphStore<B>

§

impl<B> Unpin for KernelGraphStore<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for KernelGraphStore<B>
where B: UnsafeUnpin,

§

impl<B> UnwindSafe for KernelGraphStore<B>
where B: UnwindSafe,

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> 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, 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.