#![allow(clippy::unsafe_derive_deserialize)]
pub mod command;
pub mod protocol;
use std::marker::PhantomData;
use crux_core::{Command, Request, command::RequestBuilder};
pub use protocol::*;
#[deprecated(
since = "0.10.0",
note = "The `crux_platform` crate is deprecated. Copy the types into your own project instead. See the README for migration guidance: https://crates.io/crates/crux_platform"
)]
pub struct Platform<Effect, Event> {
effect: PhantomData<Effect>,
event: PhantomData<Event>,
}
#[allow(deprecated)]
impl<Effect, Event> Platform<Effect, Event>
where
Effect: From<Request<PlatformRequest>> + Send + 'static,
Event: Send + 'static,
{
#[must_use]
pub fn get() -> RequestBuilder<Effect, Event, impl Future<Output = PlatformResponse>> {
Command::request_from_shell(PlatformRequest)
}
}