#![cfg_attr(docsrs, doc(hidden))]
use crate::{NoElement, View, ViewPathTracker, ViewSequence, run_once};
#[derive(Debug)]
pub enum Fake {}
impl ViewPathTracker for Fake {
fn environment(&mut self) -> &mut crate::environment::Environment {
match *self {}
}
fn push_id(&mut self, _: crate::ViewId) {
match *self {}
}
fn pop_id(&mut self) {
match *self {}
}
fn view_path(&mut self) -> &[crate::ViewId] {
match *self {}
}
}
pub trait DocsView<State, Action = ()>: View<State, Action, Fake> {}
impl<V, State, Action> DocsView<State, Action> for V where V: View<State, Action, Fake> {}
pub trait DocsViewSequence<State, Action = ()>:
ViewSequence<State, Action, Fake, NoElement>
{
}
impl<Seq, State, Action> DocsViewSequence<State, Action> for Seq where
Seq: ViewSequence<State, Action, Fake, NoElement>
{
}
#[derive(Debug)]
pub struct State;
pub fn some_component<Action>(
_: &mut State,
) -> impl DocsView<State, Action, Element = NoElement> + use<Action> {
run_once(|| {})
}
pub fn some_component_generic<State, Action>(
_: &mut State,
) -> impl DocsView<State, Action, Element = NoElement> + use<State, Action> {
run_once(|| {})
}