pub struct HostedApp { /* private fields */ }Expand description
A host that runs documents of its own, mounted headlessly: for proving what the host adds to an
app that is not a ResourceApp (tilolang runs other apps’ packages in one window). The same
opening as HeadlessApp: the real component runtime, storage, permissions and history, and the
host’s refusal of an action surface that breaks the contract.
Implementations§
Source§impl HostedApp
impl HostedApp
Sourcepub fn open(
definition: &'static ApplicationDefinition,
author: &str,
) -> Result<Self, LaunchError>
pub fn open( definition: &'static ApplicationDefinition, author: &str, ) -> Result<Self, LaunchError>
The app definition as its owner author opens it on a fresh private profile.
Sourcepub fn open_data_dir(
definition: &'static ApplicationDefinition,
author: &str,
directory: &Path,
) -> Result<Self, LaunchError>
pub fn open_data_dir( definition: &'static ApplicationDefinition, author: &str, directory: &Path, ) -> Result<Self, LaunchError>
The app definition as its owner author opens it on the profile --data-dir directory opens: what a test opens again to see what an earlier window kept. Only one
writer may hold a profile.
§Errors
As Self::open.
Sourcepub fn harness(&mut self) -> &mut FrameHarness
pub fn harness(&mut self) -> &mut FrameHarness
Sourcepub fn invoke(
&mut self,
invoker: Option<ActionInvoker>,
ambient: Option<&ActionContext>,
resource: &str,
action: &str,
arguments: &Map<String, Value>,
confirmed: bool,
) -> Result<ActionOutput, DoorError>
pub fn invoke( &mut self, invoker: Option<ActionInvoker>, ambient: Option<&ActionContext>, resource: &str, action: &str, arguments: &Map<String, Value>, confirmed: bool, ) -> Result<ActionOutput, DoorError>
Invoke action of the published resource through the host’s door, as invoker (the
person at the window when None), within ambient: the task the invoker is carrying
out, recorded with every change it makes. Answers what the operation answered.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HostedApp
impl !RefUnwindSafe for HostedApp
impl !Send for HostedApp
impl !Sync for HostedApp
impl Unpin for HostedApp
impl UnsafeUnpin for HostedApp
impl !UnwindSafe for HostedApp
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§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.§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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more