pub trait ScopeObject:
Sized
+ Send
+ Sync
+ Debug
+ 'static {
type Error: Error + Send + Sync;
// Required method
fn deserialize<R: Runtime>(
app: &AppHandle<R>,
raw: Value,
) -> Result<Self, Self::Error>;
}Expand description
Marks a type as a scope object.
Usually you will just rely on serde::de::DeserializeOwned instead of implementing it manually,
though this is useful if you need to do some initialization logic on the type itself.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.