pub struct StateDebug {
registry: Arc<StateRegistry>,
}Expand description
Typed debug handle over the SDK’s state registry: a generic browse across every registered repository, both client-managed and SDK-managed.
Holds a cheap, Arc-backed handle to the registry, so nothing borrows across
the FFI boundary. Reached through the client’s debug tree; bypasses the
type-safe public API.
Fields§
§registry: Arc<StateRegistry>Implementations§
Source§impl StateDebug
impl StateDebug
Sourcepub(crate) fn new(registry: Arc<StateRegistry>) -> Self
pub(crate) fn new(registry: Arc<StateRegistry>) -> Self
Wrap the owning registry handle. Reached through StateRegistryDebugExt.
Source§impl StateDebug
impl StateDebug
Sourcepub fn types(&self) -> Vec<String>
pub fn types(&self) -> Vec<String>
Names of every registered repository (client- and SDK-managed).
Sourcepub async fn list(&self, type_name: String) -> String
pub async fn list(&self, type_name: String) -> String
List a repository’s values as a JSON-array string (JSON.parse it),
addressed by type name. Values only (no keys). Raw stored JSON.
Sourcepub async fn get(&self, type_name: String, key: String) -> String
pub async fn get(&self, type_name: String, key: String) -> String
Read one item by type name and string key, as a JSON string ("null" if
absent).
Sourcepub async fn set(&self, type_name: String, key: String, value: String) -> bool
pub async fn set(&self, type_name: String, key: String, value: String) -> bool
Write one item by type name and string key. value is the item as a JSON
string. Returns true if the write landed; false on a bad JSON string,
an unknown type, a bad key, a value that does not deserialize, or a failed
write, so a caller (e.g. a seeding harness) can tell a no-op from a write.
Trait Implementations§
Source§impl From<StateDebug> for JsValue
impl From<StateDebug> for JsValue
Source§fn from(value: StateDebug) -> Self
fn from(value: StateDebug) -> Self
Source§impl FromWasm for StateDebug
Available on crate feature wasm only.
impl FromWasm for StateDebug
wasm only.Source§impl FromWasmAbi for StateDebug
impl FromWasmAbi for StateDebug
Source§impl IntoWasmAbi for StateDebug
impl IntoWasmAbi for StateDebug
Source§impl LongRefFromWasmAbi for StateDebug
impl LongRefFromWasmAbi for StateDebug
Source§impl OptionFromWasmAbi for StateDebug
impl OptionFromWasmAbi for StateDebug
Source§impl OptionIntoWasmAbi for StateDebug
impl OptionIntoWasmAbi for StateDebug
Source§impl RefFromWasmAbi for StateDebug
impl RefFromWasmAbi for StateDebug
Source§type Anchor = RcRef<StateDebug>
type Anchor = RcRef<StateDebug>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for StateDebug
impl RefMutFromWasmAbi for StateDebug
impl SupportsConstructor for StateDebug
impl SupportsInstanceProperty for StateDebug
impl SupportsStaticProperty for StateDebug
Source§impl ToWasm for StateDebug
Available on crate feature wasm only.
impl ToWasm for StateDebug
wasm only.Source§impl TryFromJsValue for StateDebug
impl TryFromJsValue for StateDebug
Source§impl VectorFromWasmAbi for StateDebug
impl VectorFromWasmAbi for StateDebug
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[StateDebug]>
Source§impl VectorIntoWasmAbi for StateDebug
impl VectorIntoWasmAbi for StateDebug
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[StateDebug]>) -> Self::Abi
Source§impl WasmDescribe for StateDebug
impl WasmDescribe for StateDebug
Source§impl WasmDescribeVector for StateDebug
impl WasmDescribeVector for StateDebug
Auto Trait Implementations§
impl !RefUnwindSafe for StateDebug
impl !UnwindSafe for StateDebug
impl Freeze for StateDebug
impl Send for StateDebug
impl Sync for StateDebug
impl Unpin for StateDebug
impl UnsafeUnpin for StateDebug
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> 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> ⓘ
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.