Skip to main content

AppComponent

Struct AppComponent 

pub struct AppComponent { /* private fields */ }
Expand description

Real app content and its lifetime; hosts cannot extract an unbound root.

Implementations§

§

impl AppComponent

pub fn take_replacement(&mut self) -> Option<ComponentReplacement>

The component the app built to show another record in this one’s place, once: the host closes this component and mounts that one.

pub const fn set_behaviour(&mut self, behaviour: ComponentBehaviour)

Set how the hosting window treats this component’s tree.

pub fn app_id(&self) -> &str

The id of the application this component is an instance of.

pub fn collaborate_through( &self, connector: HostSessionConnector, ) -> Option<CollaborationManager>

A collaboration manager for this component’s record, reached through the host’s connector as an app the host launched: what a host showing the component inside its own process hands the App it runs it in, so the component publishes and is invoked through the session broker as a launched app is. None when the component’s records have no route the broker could acknowledge.

pub fn register_document_history( &mut self, definition: &'static HistoryDefinition, ) -> Result<(), HistoryRegistrationError>

Register presentation for this component’s actual document custody. Every domain scope reads that record; external scopes retain their stated reason. This metadata carries no new authority and follows native/headless/tile mounts.

§Errors

Refuses missing, stale or foreign document custody and invalid scope metadata.

pub fn register_document_and_file_history( &mut self, definition: &'static HistoryDefinition, files: FileHistorySource, ) -> Result<(), HistoryRegistrationError>

Register presentation for this component’s document, as Self::register_document_history, and for the files of the mounted filesystem it shows: every checked-file scope reads the file files names.

§Errors

As Self::register_document_history.

pub fn new( context: HostContext, root: Box<dyn AppWidget>, registry: ActionRegistry, ) -> AppComponent

pub fn record(&self) -> &RecordCheckout

pub fn mount( &mut self, sink: impl Fn(WakeEvent) + Send + Sync + 'static, ) -> Result<(), LaunchError>

§Errors

A component can be mounted once and a closed lifetime cannot be reopened.

pub fn mount_with_owner_queue( &mut self, queue: &OwnerWakeQueue, sink: impl Fn(WakeEvent) + Send + Sync + 'static, ) -> Result<(), LaunchError>

Mount with exact-owner queue intake while retaining the original host sink. Registration owns no application callback and its sink retains only weak metadata.

§Errors

Refuses unprepared, already registered, stale or closed components.

pub fn capture_local_view(&self) -> Result<View, ThawError>

§Errors

Rejects closed components and invalid widget geometry.

pub fn restore_local_view(&mut self, view: &View) -> Result<(), ThawError>

Local hooks cover scroll, mode and focused ephemeral state. App-specific fields absent from View are unsupported; they must not be smuggled in as document bytes.

§Errors

Rejects malformed geometry or closed components before invoking widget hooks.

pub fn suspend(&mut self) -> ComponentCloseReport

pub fn close(&mut self) -> ComponentCloseReport

Save through the original store, retain failures, and permanently close this lifetime.

pub fn close_report(&self) -> Option<&ComponentCloseReport>

Trait Implementations§

§

impl Drop for AppComponent

§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,