pub struct Kernel { /* private fields */ }Implementations§
Source§impl Kernel
impl Kernel
pub fn execute( &mut self, raw_target: impl AsRef<str>, body: Option<ExecuteValue>, ) -> Result<ExecuteValue, ExecuteError>
pub fn execute_ast( &mut self, target: MeTargetAst, body: Option<ExecuteValue>, ) -> Result<ExecuteValue, ExecuteError>
pub fn install_recipient_key( &mut self, recipient_key_id: &str, private_key: impl Into<Vec<u8>>, ) -> Result<&mut Self, ExecuteError>
pub fn uninstall_recipient_key(&mut self, recipient_key_id: &str) -> &mut Self
pub fn store_wrapped_key( &mut self, key_id: &str, envelope: Value, recipient_key_id: Option<String>, ) -> Result<&mut Self, ExecuteError>
pub fn read_wrapped_key(&self, key_id: &str) -> Result<Value, ExecuteError>
pub fn key_space_manifest(&self) -> BTreeMap<String, StoredWrappedKey>
Source§impl Kernel
impl Kernel
pub fn new() -> Self
pub fn with_seed(seed: impl Into<String>) -> Self
pub fn with_compound_seed(who: &str, secret: &str) -> Self
pub fn memories(&self) -> &[Memory]
pub fn set_seed(&mut self, seed: impl Into<String>) -> &mut Self
pub fn reseed_identity(&mut self, who: &str, secret: &str) -> &mut Self
pub fn identity_hash(&self) -> Option<&str>
pub fn active_expression(&self) -> Option<&str>
pub fn set_active_expression( &mut self, expression: impl Into<Option<String>>, ) -> &mut Self
pub fn prove_with_timestamp( &self, input: ProofInput, timestamp: u64, ) -> Result<ProofResult, ProofError>
pub fn inspect(&self) -> InspectResult
pub fn inspect_last(&self, last: usize) -> InspectResult
pub fn active_identity(&self) -> Option<&str>
pub fn operators(&self) -> &BTreeMap<String, OperatorDefinition>
pub fn events(&self) -> &[KernelEvent]
pub fn event_cursor(&self) -> usize
pub fn events_since(&self, cursor: usize) -> &[KernelEvent]
pub fn drain_events_since(&mut self, cursor: usize) -> Vec<KernelEvent>
pub fn drain_events(&mut self) -> Vec<KernelEvent>
pub fn events_matching( &self, path: impl IntoPath, ) -> Result<Vec<KernelEvent>, KernelError>
pub fn drain_events_matching( &mut self, path: impl IntoPath, ) -> Result<Vec<KernelEvent>, KernelError>
pub fn clear_events(&mut self) -> &mut Self
pub fn operator_kind(&self, operator: &str) -> Option<&str>
pub fn recompute_mode(&self) -> RecomputeMode
pub fn set_recompute_mode(&mut self, mode: RecomputeMode) -> &mut Self
pub fn define_operator( &mut self, operator: &str, kind: &str, ) -> Result<(), KernelError>
pub fn is_secret_scope(&self, path: impl IntoPath) -> bool
pub fn is_noise_scope(&self, path: impl IntoPath) -> bool
pub fn effective_secret( &self, path: impl IntoPath, ) -> Result<String, KernelError>
pub fn secret_material_v3( &self, path: impl IntoPath, mode: SecretMaterialMode, purpose: SecretMaterialPurpose, ) -> Result<[u8; 32], KernelError>
pub fn secret_blob_keys_v3( &self, path: impl IntoPath, mode: SecretMaterialMode, ) -> Result<BlobV3DerivedKeys, KernelError>
pub fn encrypt_secret_value_v3( &self, path: impl IntoPath, value: impl Into<Value>, nonce: [u8; 16], ) -> Result<String, KernelError>
pub fn decrypt_secret_value_v3( &self, path: impl IntoPath, blob: &str, ) -> Result<Option<Value>, KernelError>
pub fn postulate( &mut self, path: impl IntoPath, value: impl Into<Value>, ) -> Result<&Memory, KernelError>
pub fn postulate_with_operator( &mut self, path: impl IntoPath, operator: Option<String>, value: impl Into<Value>, ) -> Result<&Memory, KernelError>
pub fn remove(&mut self, path: impl IntoPath) -> Result<&Memory, KernelError>
pub fn derive( &mut self, scope: impl IntoPath, name: impl IntoPath, expression: &str, ) -> Result<&Memory, KernelError>
pub fn collect<I, P>(&self, paths: I) -> Result<Value, KernelError>where
I: IntoIterator<Item = P>,
P: IntoPath,
pub fn query<I, P>(
&mut self,
target_path: impl IntoPath,
paths: I,
) -> Result<&Memory, KernelError>where
I: IntoIterator<Item = P>,
P: IntoPath,
pub fn noise( &mut self, path: impl IntoPath, noise: &str, ) -> Result<&Memory, KernelError>
pub fn secret( &mut self, path: impl IntoPath, secret: &str, ) -> Result<&Memory, KernelError>
pub fn pointer( &mut self, path: impl IntoPath, target: impl IntoPath, ) -> Result<&Memory, KernelError>
pub fn claim_identity(&mut self, id: &str) -> Result<&Memory, KernelError>
pub fn identity( &mut self, path: impl IntoPath, id: &str, ) -> Result<&Memory, KernelError>
pub fn read(&self, path: impl IntoPath) -> Option<&Value>
pub fn read_fresh(&mut self, path: impl IntoPath) -> Option<Value>
pub fn read_public(&self, path: impl IntoPath) -> Option<&Value>
pub fn children( &self, prefix: impl IntoPath, ) -> Result<Vec<String>, KernelError>
pub fn read_public_subtree( &self, prefix: impl IntoPath, ) -> Result<Option<Value>, KernelError>
pub fn explain_fresh( &mut self, path: impl IntoPath, ) -> Result<ExplainResult, KernelError>
pub fn explain(&self, path: impl IntoPath) -> Result<ExplainResult, KernelError>
pub fn export_snapshot(&self) -> Snapshot
pub fn hydrate(snapshot: Snapshot) -> Result<Self, KernelError>
pub fn learn(&mut self, memory: &Memory) -> Result<&Memory, KernelError>
pub fn replay_memories<I>(&mut self, memories: I) -> Result<(), KernelError>where
I: IntoIterator<Item = Memory>,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kernel
impl RefUnwindSafe for Kernel
impl Send for Kernel
impl Sync for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernel
impl UnwindSafe for Kernel
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