pub struct ProgramEngine { /* private fields */ }Expand description
A terminal browser, named by the app, run in a terminal pane: its screen is the page. Nothing of ours ships with it, and nothing is downloaded; install the browser you want.
The browser is started with the address as its last argument. An
address that starts with -, or has a control character in it, is
refused (open fails), so that it is never read as
one of the browser’s options. Its own keys work as they do in a
terminal (following links, its own history). The view’s back, forward
and reload restart it at an address from the engine’s own history of
what was opened; the address shown is the last one opened, since a
terminal browser does not say where its links led.
Implementations§
Source§impl ProgramEngine
impl ProgramEngine
Sourcepub fn new(program: impl Into<OsString>) -> ProgramEngine
pub fn new(program: impl Into<OsString>) -> ProgramEngine
Run program with the address as its argument.
Sourcepub fn args<I: IntoIterator<Item = S>, S: Into<OsString>>(
self,
args: I,
) -> ProgramEngine
pub fn args<I: IntoIterator<Item = S>, S: Into<OsString>>( self, args: I, ) -> ProgramEngine
Arguments before the address.
Sourcepub fn detect() -> ProgramEngine
pub fn detect() -> ProgramEngine
The browser in BROWSER_VARIABLE, else the first of
KNOWN_BROWSERS on PATH. With none, the view says so.
Sourcepub fn with_hosts(
hosts: impl FnMut(&str) -> Box<dyn PtyHost> + 'static,
) -> ProgramEngine
pub fn with_hosts( hosts: impl FnMut(&str) -> Box<dyn PtyHost> + 'static, ) -> ProgramEngine
Run each page in a host hosts makes from its address, instead of
a local program: a browser on another machine, or a test.
Trait Implementations§
Source§impl WebEngine for ProgramEngine
impl WebEngine for ProgramEngine
Source§fn resize(&mut self, columns: u16, rows: u16) -> Result<()>
fn resize(&mut self, columns: u16, rows: u16) -> Result<()>
columns x rows cells.fn input(&mut self, input: WebInput) -> Result<()>
fn back(&mut self) -> Result<()>
fn forward(&mut self) -> Result<()>
fn reload(&mut self) -> Result<()>
Source§fn set_notify(&mut self, notify: Notify)
fn set_notify(&mut self, notify: Notify)
notify when there is a new frame or state. Given once.Auto Trait Implementations§
impl !RefUnwindSafe for ProgramEngine
impl !Send for ProgramEngine
impl !Sync for ProgramEngine
impl !UnwindSafe for ProgramEngine
impl Freeze for ProgramEngine
impl Unpin for ProgramEngine
impl UnsafeUnpin for ProgramEngine
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.