pub struct SparqlDidHandler<'a> {
pub quins: &'a [NQuin],
pub did_cache: [Option<DidCacheEntry>; 32],
pub cache_count: u8,
}Expand description
SPARQL-DID Handler
Fields§
§quins: &'a [NQuin]§did_cache: [Option<DidCacheEntry>; 32]§cache_count: u8Implementations§
Source§impl<'a> SparqlDidHandler<'a>
impl<'a> SparqlDidHandler<'a>
pub fn new(quins: &'a [NQuin]) -> Self
Sourcepub fn resolve_did(&mut self, did: u64) -> Result<DidResolutionPointer, String>
pub fn resolve_did(&mut self, did: u64) -> Result<DidResolutionPointer, String>
Resolve a u64 DID pointer to ABI-layer endpoint/verification pointers
(with caching).
endpoint_url and verification_method are derived via FNV-1a over the
DID’s 60-bit identity bytes, salted with a method tag — not XOR with a
magic number. They live in the same q_hash pointer space as the rest of
the SPARQL engine. The human-readable URL and verification-method string
for a DID are available via DIDResolver::resolve.
Sourcepub fn verify_signature(
&self,
_did: u64,
signature: &[u8],
data: &[u8],
) -> Result<DidVerificationResult, String>
pub fn verify_signature( &self, _did: u64, signature: &[u8], data: &[u8], ) -> Result<DidVerificationResult, String>
Verify DID signature (zero-allocation using stack-allocated key frame)
Sourcepub fn check_permission(
&self,
did: u64,
graph: u64,
permission_type: u8,
) -> Result<DidPermissionResult, String>
pub fn check_permission( &self, did: u64, graph: u64, permission_type: u8, ) -> Result<DidPermissionResult, String>
Check DID permission for graph access
Sourcepub fn authenticate_did(
&self,
did: u64,
auth_method: u8,
_auth_payload: &[u8],
) -> Result<bool, String>
pub fn authenticate_did( &self, did: u64, auth_method: u8, _auth_payload: &[u8], ) -> Result<bool, String>
Authenticate with DID (strips heavy payloads at boundary)
Sourcepub fn sign_with_did(&self, did: u64, data: &[u8]) -> Result<Vec<u8>, String>
pub fn sign_with_did(&self, did: u64, data: &[u8]) -> Result<Vec<u8>, String>
Sign data with DID (zero-allocation)
Sourcepub fn invalidate_cache(&mut self, did: u64)
pub fn invalidate_cache(&mut self, did: u64)
Invalidate cache entry
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SparqlDidHandler<'a>
impl<'a> RefUnwindSafe for SparqlDidHandler<'a>
impl<'a> Send for SparqlDidHandler<'a>
impl<'a> Sync for SparqlDidHandler<'a>
impl<'a> Unpin for SparqlDidHandler<'a>
impl<'a> UnsafeUnpin for SparqlDidHandler<'a>
impl<'a> UnwindSafe for SparqlDidHandler<'a>
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>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.