use futures_util::future::BoxFuture;
use rho_protocol::{BrowserCursor, BrowserDestination, BrowserInput, BrowserTabAction};
pub(crate) trait PersonTabs: Send + Sync {
fn input(
&self,
tab: String,
input: BrowserInput,
) -> BoxFuture<'_, Result<Option<BrowserCursor>, Refused>>;
fn navigate(&self, tab: String, to: BrowserDestination) -> BoxFuture<'_, Result<(), Refused>>;
fn tab(&self, action: BrowserTabAction) -> BoxFuture<'_, Result<Option<String>, Refused>>;
fn close(&self) -> BoxFuture<'_, ()>;
fn fit(&self) -> BoxFuture<'_, ()>;
fn follow(&self) -> BoxFuture<'_, ()>;
}
#[derive(Debug, PartialEq, Eq)]
pub(crate) enum Refused {
NotDriver,
Closing,
NoTab(String),
Invalid(String),
Browser(String),
}