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>
impl<B: MemoryBacking> KernelGraphStore<B>
Sourcepub 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>
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.
Sourcepub const fn handle(&self) -> GraphHandle
pub const fn handle(&self) -> GraphHandle
Returns the store handle.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the number of nodes.
Sourcepub const fn edge_count(&self) -> u32
pub const fn edge_count(&self) -> u32
Returns the number of edges.
Sourcepub const fn partition_meta(&self) -> &PartitionMeta
pub const fn partition_meta(&self) -> &PartitionMeta
Returns the partition metadata.
Sourcepub fn graph_apply_proved(
&mut self,
mutation: &GraphMutation,
proof: &ProofToken,
capability: &Capability,
current_time_ns: u64,
) -> Result<GraphMutationResult>
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 applyproof- The proof token authorizing the mutationcapability- Capability authorizing the mutationcurrent_time_ns- Current time for proof verification
§Returns
A mutation result including the attestation.
Sourcepub const fn proof_policy(&self) -> &ProofPolicy
pub const fn proof_policy(&self) -> &ProofPolicy
Returns the proof policy.
Sourcepub fn witness_entry_count(&self) -> usize
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> 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