pub struct CertmeshHandle { /* private fields */ }Implementations§
Source§impl CertmeshHandle
impl CertmeshHandle
pub fn core(&self) -> Result<Arc<CertmeshCore>, KoiError>
pub async fn status(&self) -> CapabilityStatus
Sourcepub fn posture(&self) -> Result<Posture, KoiError>
pub fn posture(&self) -> Result<Posture, KoiError>
This node’s current trust posture — the mode oracle (ADR-020 §0).
Embedded only: a remote handle has no endpoint to query the daemon’s
posture yet (that arrives with the diagnose/status surface in a later
ADR-020 phase), so it returns DisabledCapability.
Sourcepub async fn local_identity(&self) -> Result<Option<Identity>, KoiError>
pub async fn local_identity(&self) -> Result<Option<Identity>, KoiError>
This node’s live identity, or None if it is Open (ADR-020 §7).
Read-only; embedded only.
Sourcepub async fn ensure_identity(&self) -> Result<Option<Identity>, KoiError>
pub async fn ensure_identity(&self) -> Result<Option<Identity>, KoiError>
Ensure this node holds a current identity, then return it (ADR-020 §7). Idempotent and mode-transparent; embedded only.
Sourcepub async fn sign(&self, bytes: &[u8]) -> Result<Envelope, KoiError>
pub async fn sign(&self, bytes: &[u8]) -> Result<Envelope, KoiError>
Sign bytes into an Envelope (ADR-020 §3). Mode-transparent: a
freshness-stamped passthrough when Open, ES256-signed when Authenticated.
Embedded only.
Sourcepub async fn verify(&self, env: &Envelope) -> Result<Assurance, KoiError>
pub async fn verify(&self, env: &Envelope) -> Result<Assurance, KoiError>
Verify an Envelope, returning an Assurance (ADR-020 §3). Read a trusted
identity only via Assurance::identity(). Embedded only.
Sourcepub async fn seal(&self, bytes: &[u8]) -> Result<Sealed, KoiError>
pub async fn seal(&self, bytes: &[u8]) -> Result<Sealed, KoiError>
Seal bytes into a Sealed (ADR-020 §4). The confidentiality rung, today a
signed-not-encrypted passthrough; the consumer codes against the final API
now. Embedded only.
Sourcepub async fn open(&self, sealed: &Sealed) -> Result<Opened, KoiError>
pub async fn open(&self, sealed: &Sealed) -> Result<Opened, KoiError>
Open a Sealed → Opened (recovered bytes + trust state, ADR-020 §4). A
tampered/rejected message errors rather than yielding bytes. Embedded only.
Sourcepub async fn diagnose(&self) -> Result<TrustDiagnosis, KoiError>
pub async fn diagnose(&self) -> Result<TrustDiagnosis, KoiError>
Run the trust-doctor (ADR-020 §13) → a structured TrustDiagnosis: posture,
identity + renewal health, on-disk-leaf integrity, self-revocation, and the
CA trust-install state, each with an exact remedy. is_red()/exit_code()
fail loud. Embedded only.
Sourcepub async fn client_for(&self, peer: &Peer) -> Result<PeerClient, KoiError>
pub async fn client_for(&self, peer: &Peer) -> Result<PeerClient, KoiError>
Build a posture-keyed client to a discovered Peer (ADR-020 §6): plain
HTTP to an Open peer, mTLS to a secure peer — the caller writes one code
path. Embedded only (a remote handle has no local identity to present).
Errors loudly (not via an opaque handshake failure) when the peer requires
authentication but this node is Open, or when the peer anchors to a
different mesh — see koi_certmesh::CertmeshCore::client_for.
Auto Trait Implementations§
impl !RefUnwindSafe for CertmeshHandle
impl !UnwindSafe for CertmeshHandle
impl Freeze for CertmeshHandle
impl Send for CertmeshHandle
impl Sync for CertmeshHandle
impl Unpin for CertmeshHandle
impl UnsafeUnpin for CertmeshHandle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more