pub struct CapabilityRegistry { /* private fields */ }
Expand description
Registry for managing capability references across protocol boundaries Supports both import and export of capabilities with proper lifecycle management
Implementations§
Source§impl CapabilityRegistry
impl CapabilityRegistry
pub fn new() -> Self
Sourcepub fn export_capability(&self, capability: Arc<dyn RpcTarget>) -> i64
pub fn export_capability(&self, capability: Arc<dyn RpcTarget>) -> i64
Export a capability and return its ID for wire marshaling
Sourcepub fn import_capability(&self, id: i64) -> Option<Arc<dyn RpcTarget>>
pub fn import_capability(&self, id: i64) -> Option<Arc<dyn RpcTarget>>
Import a capability by ID for method calls
Sourcepub fn has_capability(&self, id: i64) -> bool
pub fn has_capability(&self, id: i64) -> bool
Check if a capability ID exists
Sourcepub fn release_capability(&self, id: i64) -> bool
pub fn release_capability(&self, id: i64) -> bool
Release a capability reference (decrement ref count)
Sourcepub fn get_ref_count(&self, id: i64) -> u32
pub fn get_ref_count(&self, id: i64) -> u32
Get current reference count for a capability
Sourcepub fn get_exported_ids(&self) -> Vec<i64>
pub fn get_exported_ids(&self) -> Vec<i64>
Get all exported capability IDs
Sourcepub fn create_stub_reference(&self, id: i64) -> Option<StubReference>
pub fn create_stub_reference(&self, id: i64) -> Option<StubReference>
Create a stub reference for a capability (for import table integration)
Trait Implementations§
Source§impl Debug for CapabilityRegistry
impl Debug for CapabilityRegistry
Auto Trait Implementations§
impl !Freeze for CapabilityRegistry
impl RefUnwindSafe for CapabilityRegistry
impl Send for CapabilityRegistry
impl Sync for CapabilityRegistry
impl Unpin for CapabilityRegistry
impl UnwindSafe for CapabilityRegistry
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