pub struct WorkerCell {
pub cell_id: usize,
pub memory_boundary: usize,
pub attached_blocks: Vec<QualiaSuperBlock>,
pub dnssec_resolver: Option<DnssecResolver>,
pub wireguard_interface: Option<SocialWebNetInterface>,
pub q42_context: Option<Arc<Q42Context>>,
pub cbor_ld_parser: Option<Arc<Q42CborLdParser>>,
pub dnssec_cache: HashMap<String, CachedPeer>,
pub peer_capabilities: HashMap<String, u64>,
pub semantic_contexts: HashMap<String, u64>,
}Expand description
A 512MB structural floor bounded worker cell (Fractal Sharding). Each cell runs isolated logic evaluation or physics engines.
Fields§
§cell_id: usize§memory_boundary: usize§attached_blocks: Vec<QualiaSuperBlock>§dnssec_resolver: Option<DnssecResolver>§wireguard_interface: Option<SocialWebNetInterface>§q42_context: Option<Arc<Q42Context>>§cbor_ld_parser: Option<Arc<Q42CborLdParser>>§dnssec_cache: HashMap<String, CachedPeer>DNSSEC peer-resolution cache keyed by domain (TTL-bounded)
peer_capabilities: HashMap<String, u64>Per-peer capabilities bitmask keyed by peer id string
semantic_contexts: HashMap<String, u64>Per-peer semantic context keyed by peer id string
Implementations§
Source§impl WorkerCell
impl WorkerCell
pub fn new(cell_id: usize) -> Self
Sourcepub fn init_dnssec_resolver(
&mut self,
trusted_anchors: HashMap<String, [u8; 32]>,
)
pub fn init_dnssec_resolver( &mut self, trusted_anchors: HashMap<String, [u8; 32]>, )
Initialize DNSSEC resolver with trusted anchors
Sourcepub fn init_wireguard_interface(
&mut self,
interface_name: String,
local_port: u16,
)
pub fn init_wireguard_interface( &mut self, interface_name: String, local_port: u16, )
Initialize SocialWebNet interface
Sourcepub fn init_q42_lexicon(
&mut self,
volume: &Q42Volume,
) -> Result<(), CborLdError>
pub fn init_q42_lexicon( &mut self, volume: &Q42Volume, ) -> Result<(), CborLdError>
Initialize Q42 lexicon for CBOR-LD semantic processing
Sourcepub fn resolve_peer_dnssec_payload(
&mut self,
domain: &str,
) -> Result<DnssecSemanticPayload, &'static str>
pub fn resolve_peer_dnssec_payload( &mut self, domain: &str, ) -> Result<DnssecSemanticPayload, &'static str>
Resolve CBOR-LD DNSSEC record for peer domain, returning the full semantic payload.
This is the internal semantic-payload resolver used by the WireGuard bootstrap
pipeline. The public resolve_peer_dnssec returns a
lightweight PeerEndpoint with TTL caching.
Sourcepub fn parse_cbor_ld_to_quin(
&self,
cbor_data: &[u8],
) -> Result<Vec<u64>, DaemonError>
pub fn parse_cbor_ld_to_quin( &self, cbor_data: &[u8], ) -> Result<Vec<u64>, DaemonError>
Public CBOR-LD → Quin-pointer parser.
Uses the Q42 lexicon-based CBOR-LD parser when available, deriving a vector of 64-bit Quin pointers (one per 8-byte chunk of the parsed semantic payload). If the parser is not initialised or the payload is invalid, an error is returned.
Sourcepub fn resolve_peer_dnssec(
&mut self,
domain: &str,
) -> Result<PeerEndpoint, DaemonError>
pub fn resolve_peer_dnssec( &mut self, domain: &str, ) -> Result<PeerEndpoint, DaemonError>
Resolve a peer via DNSSEC, returning a lightweight PeerEndpoint with TTL caching.
Resolution order:
- Return a fresh cached
PeerEndpointif one exists and is within its TTL. - Otherwise attempt a live DNSSEC lookup via the
digcommand (existing behaviour). - If
digis unavailable or fails, fall back to a deterministic mapping from the domain name to a plausible endpoint so bootstrapping can proceed offline.
The result is always cached with [DNSSEC_CACHE_TTL_SECONDS].
Sourcepub fn dnssec_cache_size(&self) -> usize
pub fn dnssec_cache_size(&self) -> usize
Number of entries currently held in the DNSSEC peer-resolution cache.
Sourcepub fn clear_dnssec_cache(&mut self)
pub fn clear_dnssec_cache(&mut self)
Clear all cached DNSSEC peer-resolution entries.
Sourcepub fn set_peer_capabilities(&mut self, peer_id: &str, capabilities: u64)
pub fn set_peer_capabilities(&mut self, peer_id: &str, capabilities: u64)
Set the capabilities bitmask for a peer (replaces the peer_capabilities: 0 TODO).
Sourcepub fn set_semantic_context(&mut self, peer_id: &str, context: u64)
pub fn set_semantic_context(&mut self, peer_id: &str, context: u64)
Set the semantic context for a peer (replaces the semantic_context: 0 TODO).
Sourcepub fn get_peer_capabilities(&self, peer_id: &str) -> Option<u64>
pub fn get_peer_capabilities(&self, peer_id: &str) -> Option<u64>
Get the capabilities bitmask for a peer, if known.
Sourcepub fn get_semantic_context(&self, peer_id: &str) -> Option<u64>
pub fn get_semantic_context(&self, peer_id: &str) -> Option<u64>
Get the semantic context for a peer, if known.
Sourcepub fn establish_wireguard_tunnel(
&mut self,
peer_payload: &DnssecSemanticPayload,
endpoint: IpAddr,
port: u16,
) -> Result<u64, &'static str>
pub fn establish_wireguard_tunnel( &mut self, peer_payload: &DnssecSemanticPayload, endpoint: IpAddr, port: u16, ) -> Result<u64, &'static str>
Establish SocialWebNet tunnel with peer
Bootstrap SocialWebNet tunnel using DNSSEC CBOR-LD resolution
Sourcepub fn parse_san_uri(&self, san_bytes: &[u8]) -> Result<u64, &'static str>
pub fn parse_san_uri(&self, san_bytes: &[u8]) -> Result<u64, &'static str>
Parse SAN URI from certificate or handshake (zero-allocation)
pub fn execute_tensor_contraction( &self, matrix_a: &[f32], matrix_b: &[f32], result: &mut [f32], size: usize, )
pub fn execute_quantum_chemistry(&self, smiles: &str) -> Option<NQuin>
Auto Trait Implementations§
impl Freeze for WorkerCell
impl RefUnwindSafe for WorkerCell
impl Send for WorkerCell
impl Sync for WorkerCell
impl Unpin for WorkerCell
impl UnsafeUnpin for WorkerCell
impl UnwindSafe for WorkerCell
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<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>
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