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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [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>
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 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>
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