pub struct App { /* private fields */ }
Expand description
Struct that implements module-wide responsibilities, currently limited to creating views on request.
Implementations§
Source§impl App
impl App
Sourcepub fn run(assistant_creator_func: AssistantCreatorFunc) -> Result<(), Error>
pub fn run(assistant_creator_func: AssistantCreatorFunc) -> Result<(), Error>
Starts an application based on Carnelian. The assistant
parameter will
be used to create new views when asked to do so by the Fuchsia view system.
Sourcepub fn test(assistant_creator_func: AssistantCreatorFunc) -> Result<(), Error>
pub fn test(assistant_creator_func: AssistantCreatorFunc) -> Result<(), Error>
Tests an application based on Carnelian. The assistant
parameter will
be used to create a single new view for testing. The test will run until the
first update call, or until a five second timeout. The Result returned is the
result of the test, an Ok(()) result means the test passed.
Sourcepub fn queue_message(&mut self, target: ViewKey, msg: Message)
pub fn queue_message(&mut self, target: ViewKey, msg: Message)
Send a message to a specific view controller. Messages not handled by the ViewController
will be forwarded to the ViewControllerAssistant
.
Auto Trait Implementations§
impl Freeze for App
impl !RefUnwindSafe for App
impl !Send for App
impl !Sync for App
impl Unpin for App
impl !UnwindSafe for App
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
Mutably borrows from an owned value. Read more