pub struct NativePolicyHost { /* private fields */ }Implementations§
Source§impl NativePolicyHost
impl NativePolicyHost
Sourcepub fn install_evidence(
&mut self,
key: &SigningKey,
rules: PolicyRules,
observations: ObservationRequirements,
not_before: u64,
expires_at: u64,
expected_generation: u64,
budget: usize,
) -> Result<PolicyStatus, PolicyError>
pub fn install_evidence( &mut self, key: &SigningKey, rules: PolicyRules, observations: ObservationRequirements, not_before: u64, expires_at: u64, expected_generation: u64, budget: usize, ) -> Result<PolicyStatus, PolicyError>
Privileged local-host operation, never an actor self-grant or remote signing endpoint. Installer identity comes from configured host trust.
Sourcepub fn admit_evidence<'slot, 'bytes>(
&mut self,
key: &SigningKey,
request: InferenceAdmission,
budget: usize,
owner: Arc<NativeAuthority>,
association: AuthenticatedInferenceAssociation,
storage: &'slot mut EvidenceStorage<'bytes>,
) -> Result<GovernedEvidenceSession<'slot, 'bytes>, PolicyError>
pub fn admit_evidence<'slot, 'bytes>( &mut self, key: &SigningKey, request: InferenceAdmission, budget: usize, owner: Arc<NativeAuthority>, association: AuthenticatedInferenceAssociation, storage: &'slot mut EvidenceStorage<'bytes>, ) -> Result<GovernedEvidenceSession<'slot, 'bytes>, PolicyError>
Durable admission with a caller-owned exclusive retained-byte slot. Earlier JSON parsing/source allocation is outside this storage budget. No public timestamp or copied ActorPolicyScope substitutes live authority.
Source§impl NativePolicyHost
impl NativePolicyHost
Sourcepub fn open(
root: &Path,
authority_root: &Path,
trust: TrustedPolicyIdentity,
budget: usize,
) -> Result<Self, PolicyError>
pub fn open( root: &Path, authority_root: &Path, trust: TrustedPolicyIdentity, budget: usize, ) -> Result<Self, PolicyError>
Only the authenticated host supplies directory and trusted identity. Do not construct a fresh host for every request: replacement/revocation must invalidate the shared handles owned by this instance.
pub fn status(&self) -> PolicyStatus
pub fn trusted_identity(&self) -> TrustedPolicyIdentity
pub fn disconnect(&self)
pub fn reload(&mut self, budget: usize) -> Result<(), PolicyError>
Sourcepub fn install(
&mut self,
key: &SigningKey,
rules: PolicyRules,
not_before: u64,
expires_at: u64,
now: u64,
expected_generation: u64,
budget: usize,
) -> Result<PolicyStatus, PolicyError>
pub fn install( &mut self, key: &SigningKey, rules: PolicyRules, not_before: u64, expires_at: u64, now: u64, expected_generation: u64, budget: usize, ) -> Result<PolicyStatus, PolicyError>
Explicit privileged human/host installation. Rules contain no principal or signing key: these come from configured trust. The caller must have authorized this operation; never expose it as an unauthenticated RPC.
pub fn revoke( &mut self, key: &SigningKey, expected_generation: u64, budget: usize, ) -> Result<PolicyStatus, PolicyError>
Sourcepub fn admit(
&mut self,
key: &SigningKey,
request: InferenceAdmission,
budget: usize,
owner: Arc<NativeAuthority>,
association: AuthenticatedInferenceAssociation,
) -> Result<GovernedTokenSession, PolicyError>
pub fn admit( &mut self, key: &SigningKey, request: InferenceAdmission, budget: usize, owner: Arc<NativeAuthority>, association: AuthenticatedInferenceAssociation, ) -> Result<GovernedTokenSession, PolicyError>
Cold admission reserves a durable, never-reused session number before returning a session. Signature verification and disk I/O are not hot-path work.
Trait Implementations§
Source§impl Drop for NativePolicyHost
impl Drop for NativePolicyHost
Auto Trait Implementations§
impl Freeze for NativePolicyHost
impl RefUnwindSafe for NativePolicyHost
impl Send for NativePolicyHost
impl Sync for NativePolicyHost
impl Unpin for NativePolicyHost
impl UnsafeUnpin for NativePolicyHost
impl UnwindSafe for NativePolicyHost
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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