pub struct InMemoryMeshRuntime { /* private fields */ }Implementations§
Source§impl InMemoryMeshRuntime
impl InMemoryMeshRuntime
pub fn new() -> Self
pub fn with_config(config: InMemoryMeshConfig) -> Self
Sourcepub fn session_nonce(&self) -> &str
pub fn session_nonce(&self) -> &str
Returns the session nonce used for request ID generation.
Sourcepub fn insert_pending_query(&self, request_id: &str)
pub fn insert_pending_query(&self, request_id: &str)
Test helper: insert a request ID into pending queries.
Useful for testing respond() without going through request(),
which auto-resolves and clears pending state.
Sourcepub fn has_suppress_previews(&self, path: &str) -> bool
pub fn has_suppress_previews(&self, path: &str) -> bool
Test helper: check whether an object at the given path has
suppress_previews set.
Trait Implementations§
Source§impl Debug for InMemoryMeshRuntime
impl Debug for InMemoryMeshRuntime
Source§impl Default for InMemoryMeshRuntime
impl Default for InMemoryMeshRuntime
Source§impl MeshRuntime for InMemoryMeshRuntime
impl MeshRuntime for InMemoryMeshRuntime
Source§fn respond(&self, request_id: &str, data_base64: &str) -> bool
fn respond(&self, request_id: &str, data_base64: &str) -> bool
Marks a pending query as answered. Returns true if the request was
pending, emitting a meshReply event with the response data.
This matches the contract of request(), which always emits
meshReply — callers can rely on drain_events() to observe
responses regardless of configuration.
fn publish(&self, topic: &str, data_base64: &str) -> bool
fn subscribe(&self, topic: &str) -> bool
fn put_object( &self, path: &str, data_base64: &str, policy: MeshObjectPolicy, ) -> bool
fn get_object_result(&self, path: &str) -> MeshObjectResult
fn request(&self, path: &str, data_base64: &str) -> String
fn status(&self) -> MeshStatusResult
fn supports_private(&self) -> bool
fn put_private_object( &self, data_base64: &str, policy: MeshObjectPolicy, ) -> MeshPrivateObjectRef
fn get_private_object_result( &self, handle: &str, capability: &str, ) -> MeshObjectResult
fn request_private( &self, handle: &str, capability: &str, _data_base64: &str, ) -> String
fn publish_private_control( &self, capability: &str, envelope: MeshControlEnvelope, ) -> bool
fn subscribe_private_control(&self, capability: &str) -> bool
fn publish_private_receipt(&self, capability: &str, data_base64: &str) -> bool
fn subscribe_private_receipt(&self, capability: &str) -> bool
fn drain_events(&self) -> Vec<HostPushEvent>
fn get_object(&self, path: &str) -> Option<String>
Auto Trait Implementations§
impl !Freeze for InMemoryMeshRuntime
impl RefUnwindSafe for InMemoryMeshRuntime
impl Send for InMemoryMeshRuntime
impl Sync for InMemoryMeshRuntime
impl Unpin for InMemoryMeshRuntime
impl UnsafeUnpin for InMemoryMeshRuntime
impl UnwindSafe for InMemoryMeshRuntime
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