Struct Reopener
pub struct Reopener { /* private fields */ }Expand description
What a component needs to open another record of its app in its own
window: the same store, identity, authority and services as the record
it shows, for another record. Taken from the HostContext before the
factory consumes it (HostContext::reopener).
Implementations§
§impl Reopener
impl Reopener
pub fn prepare(
&self,
definition: &ApplicationDefinition,
record: RecordId,
) -> Result<(HostContext, LaunchTarget), LaunchError>
pub fn prepare( &self, definition: &ApplicationDefinition, record: RecordId, ) -> Result<(HostContext, LaunchTarget), LaunchError>
A context for record of definition’s kind, opened when it exists
and reserved when it does not, with the target the factory builds it
for.
§Errors
Rejects foreign kinds, contested writers, corrupt records and denied authority.
pub fn replace(
&self,
component: AppComponent,
arguments: Vec<String>,
) -> ReplacementOutcome
pub fn replace( &self, component: AppComponent, arguments: Vec<String>, ) -> ReplacementOutcome
Ask the host to show component in this one’s place. A request the
host has not taken yet is replaced, and its component closed.
pub fn replace_with(
&self,
build: impl FnOnce(&Reopener) -> Result<ComponentReplacement, LaunchError> + 'static,
) -> ReplacementOutcome
pub fn replace_with( &self, build: impl FnOnce(&Reopener) -> Result<ComponentReplacement, LaunchError> + 'static, ) -> ReplacementOutcome
Ask the host to show the component build makes in this one’s
place, built when the host takes the request: what a component asks
while it handles an event or an operation, when the store its own
record lives in is busy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reopener
impl !RefUnwindSafe for Reopener
impl !Send for Reopener
impl !Sync for Reopener
impl Unpin for Reopener
impl UnsafeUnpin for Reopener
impl !UnwindSafe for Reopener
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> 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