Skip to main content

TestPlatform

Struct TestPlatform 

Source
pub struct TestPlatform { /* private fields */ }
Expand description

A platform a test builds: which host it claims to be, the views it offers, and each capability as the test’s own implementation or absent. It keeps the frames the framework asks for, what it says of whether it handles back, and the deadlines it asks to be woken at, so a test can assert on them; the test itself pumps the app, since there is no loop to run it.

With a compositor it has a view embedder, which adds a view on any layer the app asks it to (ViewEmbedder::add_view), at once: a TestView at the request’s metrics, carrying its id and asking what it asks of the system of the app’s host, listed among the views until the app removes it. The test tells the framework of each view’s coming and going itself, as a host would through EmbedderClient::view_added and view_removed.

Implementations§

Source§

impl TestPlatform

Source

pub fn new() -> TestPlatform

A platform claiming to be Android, as Flutter’s test binding does, in light mode, with flutter_test’s fonts, no view and no capability.

Source

pub fn on(self, target: TargetPlatform) -> TestPlatform

The same platform claiming to be target.

Source

pub fn with_view(self, view: ViewRef) -> TestPlatform

The same platform giving the app view, as a phone gives its screen.

Source

pub fn with_views(self, ids: &[ViewId]) -> TestPlatform

The same platform giving the app an 800 x 600 TestView numbered by each of ids, in that order, as a desktop gives one window to each.

Source

pub fn test_view(&self, id: ViewId) -> Rc<TestView>

The TestView numbered id among the platform’s views, however it came: given, made for a window the app asked for, or added on a layer.

§Panics

If none of the platform’s views numbered id is a TestView.

Source

pub fn elapsed(&self) -> Duration

How far the test has moved the platform’s clock since it was made.

Source

pub fn advance_clock(&self, duration: Duration)

Advances the platform’s clock by duration, so Platform::now moves only when the test says so.

Source

pub fn with_screens(self, screens: Vec<Screen>) -> TestPlatform

The same platform reporting screens from Platform::screens.

Source

pub fn set_screens(&self, screens: Vec<Screen>)

Changes the screens Platform::screens reports; the client hears of it through EmbedderClient::screens_changed.

Source

pub fn with_pointer_location(self, location: Offset) -> TestPlatform

The same platform reporting the pointer at location from Screens::pointer_location.

Source

pub fn set_pointer_location(&self, location: Option<Offset>)

Changes where Screens::pointer_location reports the pointer.

Source

pub fn added_views(&self) -> Vec<Rc<TestView>>

The views the app added on layers and has not removed, in the order it added them.

Source

pub fn give_view(&self, view: ViewRef)

Gives the app view while it runs, as an embedder adds one; the test tells the framework of it itself, as a host would through EmbedderClient::view_added.

Source

pub fn take_view(&self, id: ViewId)

Takes the view numbered id back while the app runs.

Source

pub fn with_briefly_show_password(self, shown: bool) -> TestPlatform

The same platform answering shown for the system’s setting of whether an obscured field briefly shows the character just typed; on unless set, as dart:ui’s default is.

Source

pub fn with_brightness(self, brightness: Brightness) -> TestPlatform

Source

pub fn with_default_route(self, route: impl Into<String>) -> TestPlatform

The route the host would open the app at; / unless set.

Source

pub fn with_initial_lifecycle_state( self, state: AppLifecycleState, ) -> TestPlatform

The lifecycle state the host would start the app in; none unless set.

Source

pub fn with_font_source( self, make: impl Fn() -> Box<dyn FontSource> + 'static, ) -> TestPlatform

Fonts for text to shape against, in place of flutter_test’s, where every family is FlutterTest (TestFontSource).

Source

pub fn with_system_fonts(self) -> TestPlatform

The system’s fonts in place of flutter_test’s, as a host shapes text against, for a test that looks at what its text draws as.

Source

pub fn with_gpu(self) -> TestPlatform

One GPU with no window, as a host has its renderer’s: encoded pictures, such as a PNG’s bytes, are opened on it, images made from pixels and pictures, and images read back. What a test that looks at what the app paints gives its platform. Encoded pictures are decoded by valo’s software decoders, the same on every machine.

Source

pub fn with_image_codec( self, open: impl Fn(Arc<[u8]>) -> ImageCodecFuture + 'static, ) -> TestPlatform

The decoder behind open_image_codec; none unless set, so every image fails to open.

Source

pub fn with_pixel_import( self, import: impl Fn(PixelBuffer) -> Option<Image> + 'static, ) -> TestPlatform

The renderer behind import_pixels; none unless set, so no image is made from pixels.

Source

pub fn with_picture_to_image( self, draw: impl Fn(&Picture, u32, u32) -> Option<Image> + 'static, ) -> TestPlatform

The renderer behind picture_to_image_sync; none unless set, so no picture is drawn into an image.

Source

pub fn with_read_image_pixels( self, read: impl Fn(&Image) -> ImageFuture<PixelBuffer> + 'static, ) -> TestPlatform

The renderer behind read_image_pixels; none unless set, so no image is read back.

Source

pub fn with_frame_import( self, import: impl Fn(&dyn VideoFrame) -> Option<Image> + 'static, ) -> TestPlatform

The renderer behind import_video_frame; none unless set, so no image is made of a frame.

Source

pub fn with_buffer_import( self, import: impl Fn(&dyn HardwareBuffer) -> Option<Image> + 'static, ) -> TestPlatform

The renderer behind import_hardware_buffer; none unless set, so no image is made of a buffer.

Source

pub fn with_windows(self, windows: Rc<TestWindows>) -> TestPlatform

The same platform answering requests for views with windows, as a desktop makes a window for each.

Source

pub fn with_clipboard(self, clipboard: Rc<dyn Clipboard>) -> TestPlatform

Source

pub fn with_system_chrome( self, system_chrome: Rc<dyn SystemChrome>, ) -> TestPlatform

Source

pub fn with_haptics(self, haptics: Rc<dyn Haptics>) -> TestPlatform

Source

pub fn with_system_context_menu( self, menu: Rc<dyn SystemContextMenu>, ) -> TestPlatform

Source

pub fn with_menu_bar(self, menu_bar: Rc<dyn MenuBar>) -> TestPlatform

Source

pub fn with_popup_menus(self, menus: Rc<dyn PopupMenus>) -> TestPlatform

Source

pub fn with_tray_icons(self, tray_icons: Rc<dyn TrayIcons>) -> TestPlatform

Source

pub fn with_file_dialogs( self, file_dialogs: Rc<dyn FileDialogs>, ) -> TestPlatform

Source

pub fn with_http(self, http: Rc<dyn HttpClient>) -> TestPlatform

The HTTP client behind http; none unless set, so every request fails at once.

Source

pub fn with_files(self, files: Rc<dyn Files>) -> TestPlatform

The file system behind files; none unless set, so every path fails at once.

Source

pub fn with_opener(self, opener: Rc<dyn Opener>) -> TestPlatform

Source

pub fn with_notifications( self, notifications: Rc<dyn Notifications>, ) -> TestPlatform

Source

pub fn with_compositor(self, compositor: Arc<dyn Compositor>) -> TestPlatform

Source

pub fn with_gpu_id(self, id: GpuId) -> TestPlatform

The platform’s one GPU named id, as Windows names an adapter by its LUID and Linux a GPU by its render node: what gpu_id answers for every device, and its GPU says of itself. None unless set, as on Apple’s systems and Android.

Source

pub fn with_hardware_buffer_allocator( self, allocator: Arc<dyn HardwareBufferAllocator>, ) -> TestPlatform

Source

pub fn with_players(self, players: Rc<dyn Players>) -> TestPlatform

Source

pub fn with_media_assets( self, media_assets: Rc<dyn MediaAssets>, ) -> TestPlatform

Source

pub fn with_image_codecs( self, image_codecs: Rc<dyn ImageCodecs>, ) -> TestPlatform

Source

pub fn with_video_decoders( self, video_decoders: Rc<dyn VideoDecoders>, ) -> TestPlatform

The platform’s GPU answering video_decoders as its video decoders: a host’s own, where a test decodes for real, as waft-embedder-apple’s are VideoToolbox’s.

Source

pub fn with_cameras(self, cameras: Rc<dyn Cameras>) -> TestPlatform

Source

pub fn with_video_frame_readers( self, video_frame_readers: Rc<dyn VideoFrameReaders>, ) -> TestPlatform

Source

pub fn with_caption_settings( self, caption_settings: Rc<dyn CaptionSettings>, ) -> TestPlatform

Source

pub fn with_dock_menu(self, dock_menu: Rc<dyn DockMenu>) -> TestPlatform

Source

pub fn with_text_services(self, services: Rc<dyn TextServices>) -> TestPlatform

Source

pub fn with_restoration(self, restoration: Rc<dyn Restoration>) -> TestPlatform

Source

pub fn with_app_exit(self, app_exit: Rc<dyn AppExit>) -> TestPlatform

Source

pub fn with_time_zone(self, zone: TestTimeZone) -> TestPlatform

The platform in zone, which is UTC unless a test says otherwise.

Source

pub fn set_target(&self, target: TargetPlatform)

Changes which host the platform claims to be, for a test that switches mid-way.

Source

pub fn set_briefly_show_password(&self, shown: bool)

Changes whether an obscured field briefly shows the character just typed, as the user changes the system’s setting; dart:ui tells no one, and the framework reads it next as it needs it.

Source

pub fn set_time_zone(&self, zone: TestTimeZone)

Changes the local time zone, as the user changes the system’s; a DateTime made after it reads the new zone.

Source

pub fn set_brightness(&self, brightness: Brightness)

Changes the brightness; the client hears of it as it would from a host.

Source

pub fn frame_requests(&self) -> Vec<ViewId>

The view of each frame the framework asked for since the test last took them, in the order asked, a view asked again included.

Source

pub fn has_frame_request(&self, view: ViewId) -> bool

Whether view asked for a frame since the test last took the requests.

Source

pub fn take_frame_request(&self, view: ViewId) -> bool

Takes the request view made for a frame, for the test to give it its frame; answers whether it had made one since the last take.

Source

pub fn take_frame_requests(&self) -> Vec<ViewId>

The views that asked for a frame since the last take, each once, in the order the platform gained them, for the test to give them a refresh, as a host does. A request of a view the platform does not have is dropped, as a host drops it.

Source

pub fn wakes(&self) -> Vec<Option<Instant>>

The timer wakeups the framework has set, in order. A None is the framework saying no timer is waiting.

Source

pub fn wake_now_requests(&self) -> usize

How often a ready task has asked the host to wake the app.

Source

pub fn wait_for_wake(&self, since: usize, timeout: Duration)

The host’s event loop asleep: waits up to timeout until a ready task has asked to wake the app more than since times (wake_now_requests), as work finishing on another thread does.

Trait Implementations§

Source§

impl Default for TestPlatform

Source§

fn default() -> TestPlatform

Returns the “default value” for a type. Read more
Source§

impl Platform for TestPlatform

Source§

fn import_texture( &self, _buffer: &dyn HardwareBuffer, _device: &Device, ) -> Option<Texture>

None: this host’s buffers are in memory, on no GPU, as buffers a device cannot take, which a drawing skips.

Source§

fn import_planes( &self, _buffer: &dyn HardwareBuffer, _device: &Device, ) -> Option<Vec<TextureView>>

None, as for import_texture: no device takes this host’s buffers.

Source§

fn gpu_id(&self, _device: &Device) -> Option<GpuId>

The GPU the test named, whatever the device.

Source§

fn gpu(&self, _id: Option<GpuId>) -> Option<Rc<dyn SystemGpu>>

One GPU, whatever id names, under the name the test gave it, with the decoders and the allocator the test gave it; none where it gave neither.

Source§

fn target_platform(&self) -> TargetPlatform

Which host this is, for behaviour that follows platform convention (Flutter defaultTargetPlatform). Read more
Source§

fn request_frame(&self, view: ViewId)

Asks for a frame of view: Flutter’s PlatformDispatcher.scheduleFrame, for one view. Read more
Source§

fn now(&self) -> Instant

The host clock used for frame and timer timestamps.
Source§

fn dispatcher(&self) -> Arc<dyn Dispatcher> ⓘ

The host’s threads, for waking the application or running work off the main thread: see Dispatcher.
Source§

fn views(&self) -> Vec<ViewRef>

Every view the app has now: those the platform gave it, such as a phone’s screen or an embedder’s views, and those it asked for. An app may run with none, as one on a desktop does until it asks.
Source§

fn view(&self, id: ViewId) -> Option<ViewRef>

Looks up one of the app’s views.
Source§

fn request_view( &self, config: WindowConfig, initial_data: Option<String>, ) -> Result<RequestId, ViewError>

Asks for a view in a window configured as config, carrying initial_data (View::initial_data), such as which screen to show. A desktop makes the window, Android a task of its own, an iPad that has more than one window of the app’s a window scene; a platform that gives the app its views and makes none, an iPhone or an embedder, answers ViewError::Unsupported. The view arrives later, through EmbedderClient::view_added, carrying the id answered here; a request that fails on the way is reported through EmbedderClient::view_request_failed.
Source§

fn briefly_show_password(&self) -> bool

Whether briefly displaying the characters as you type in obscured text fields is enabled in system settings (Flutter PlatformDispatcher.brieflyShowPassword). Read more
Source§

fn time_zone_offset(&self, seconds_since_epoch: i64) -> SignedDuration

The local time zone’s offset from UTC at seconds_since_epoch, positive east of UTC: the Dart VM’s DateTime_timeZoneOffsetInSeconds, which DateTime asks for each local value it makes. The instant is already within the years a 32-bit time_t holds, as the VM maps it (DateTime’s equivalent year). The host asks the system on every call, keeping nothing, so a change of zone shows in the next value made. The default is UTC’s zero, for a host with no zone to ask.
Source§

fn time_zone_name(&self, seconds_since_epoch: i64) -> String

The local time zone’s name at seconds_since_epoch, as the system gives it (an abbreviation such as “CET” on a C library and in a browser, the full name on Windows): the Dart VM’s DateTime_timeZoneName, asked as time_zone_offset is. The default is “UTC”.
Source§

fn platform_brightness(&self) -> Brightness

The platform’s light/dark preference (Flutter PlatformDispatcher.platformBrightness). Read more
Source§

fn default_route_name(&self) -> String

The route the application was started with (Flutter PlatformDispatcher.defaultRouteName). Read more
Source§

fn initial_lifecycle_state(&self) -> Option<AppLifecycleState>

The lifecycle state immediately after the application started (Flutter PlatformDispatcher.initialLifecycleState). Read more
Source§

fn font_source(&self) -> Option<Box<dyn FontSource>>

The platform’s own font lookup: faces by family name and by codepoint, the way Flutter’s engine asks the OS. None for a host without one; text then shapes only against fonts the application registers.
Source§

fn open_image_codec(&self, bytes: Arc<[u8]>) -> ImageCodecFuture

Open an encoded image, answering with a codec for its frames. Read more
Source§

fn import_pixels(&self, pixels: PixelBuffer) -> Option<Image>

An image from pixels the app already holds, with no codec in between: Flutter’s decodeImageFromPixels. None when the host has no renderer to put it on yet.
Source§

fn picture_to_image_sync( &self, picture: &Picture, width: u32, height: u32, ) -> Option<Image>

Synchronously creates a handle to an image of picture: Flutter’s Picture.toImageSync. Read more
Source§

fn read_image_pixels(&self, image: &Image) -> ImageFuture<PixelBuffer>

image’s pixels read back from the device it lives on, as straight-alpha RGBA: Dart’s Image.toByteData(format: ImageByteFormat.rawStraightRgba), as a test reads what a widget paints. It is a call on the platform, where Dart’s is on the image, because only the host holds the device; a host answers it through its SnapshotDelegate. ImageErrorKind::Unsupported where the host has no renderer.
Source§

fn import_video_frame(&self, frame: &dyn VideoFrame) -> Option<Image>

An image of a video frame the app holds, its hardware buffer imported as a texture on the renderer’s device with no copy (import_texture), holding the frame while the image lives: a still picture a media asset read, drawn as any image. Not Flutter’s: its Texture widget draws a source’s frames as they come, as VideoFrameView does. None when the host has no renderer to put it on yet, or the renderer’s device cannot take the frame’s memory.
Source§

fn import_hardware_buffer(&self, buffer: &dyn HardwareBuffer) -> Option<Image>

An image of a hardware buffer the app holds, imported as a texture on the renderer’s device with no copy (import_texture), holding the buffer while the image lives: an image the hardware codecs decoded, or a buffer the app drew, drawn as any image. None when the host has no renderer to put it on yet, or the renderer’s device cannot take the buffer’s memory.
Source§

fn screens(&self) -> Option<&dyn Screens>

The screens the app’s views are on, and where the pointer is on them (Flutter PlatformDispatcher.displays), or None where the host has none to report. Every host with screens answers, a phone with its one included; a view’s metrics name the screen it is on, and a host that hears the screens change says so through EmbedderClient::screens_changed.
Source§

fn clipboard(&self) -> Option<&dyn Clipboard>

The system clipboard, or None where the host has none.
Source§

fn system_chrome(&self) -> Option<&dyn SystemChrome>

The system UI drawn around the app, or None where the host has none.
Source§

fn haptics(&self) -> Option<&dyn Haptics>

Haptic feedback on the device, or None where the host has none.
Source§

fn system_context_menu(&self) -> Option<&dyn SystemContextMenu>

The system’s own menu over a text selection, or None where the host has none.
Source§

fn menu_bar(&self) -> Option<&dyn MenuBar>

The app’s menu bar, or None where the system has none and the app draws its own, as on Windows, Linux and phones (menus).
Source§

fn popup_menus(&self) -> Option<&dyn PopupMenus>

Menus the system opens at a point in a view, or None where the system has none and the framework draws them.
Source§

fn tray_icons(&self) -> Option<&dyn TrayIcons>

The app’s icons in the system’s tray, or None where the system has no tray.
Source§

fn file_dialogs(&self) -> Option<&dyn FileDialogs>

The system’s file dialogs, or None where the system has none.
Source§

fn http(&self) -> Option<&dyn HttpClient>

The system’s HTTP client, or None where the host has none. A client sends every method, streams bodies both ways, follows redirects as the request asks, and cancels a transfer dropped mid-way; NetworkImage fetches through it, and an app may as well. A host that carries the system’s session honours its proxy and its certificates.
Source§

fn files(&self) -> Option<&dyn Files>

The system’s file system, or None where the host has none, as a browser tab has none. Every path an app reads or writes goes through it, a picked file’s among them (PickedFile::read_all); FileImage reads through it.
Source§

fn opener(&self) -> Option<&dyn Opener>

The system’s way to open links and files in other apps, or None where it has none.
Source§

fn notifications(&self) -> Option<&dyn Notifications>

The system’s notifications, or None where it has none for the app.
Source§

fn compositor(&self) -> Option<Arc<dyn Compositor>>

The host’s compositor, where it has one: composition layers shown beside the framework’s picture. None on the web, on X11, on the inert host, and on an embedder that chose not to have one.
Source§

fn players(&self) -> Option<&dyn Players>

The system’s media players, or None where the host has none.
Source§

fn media_assets(&self) -> Option<&dyn MediaAssets>

The system’s reading of media without playing it, or None where the host has none.
Source§

fn image_codecs(&self) -> Option<&dyn ImageCodecs>

The system’s image codecs, or None where the host has none.
Source§

fn cameras(&self) -> Option<&dyn Cameras>

The system’s cameras, or None where the host has none. A host with cameras answers one with none attached as an empty list.
Source§

fn video_frame_readers(&self) -> Option<&dyn VideoFrameReaders>

The system’s frame readers, which a player or a camera hands its frames to, or None where the system hands out no frames.
Source§

fn caption_settings(&self) -> Option<&dyn CaptionSettings>

The user’s caption settings, or None where the system keeps none, as Linux and the web keep none.
Source§

fn view_embedder(&self) -> Option<&dyn ViewEmbedder>

What the app embeds views of its own with, on layers it makes and places, or None where the host cannot draw a view into such a layer: everywhere but macOS today.
Source§

fn dock_menu(&self) -> Option<&dyn DockMenu>

The menu of the app’s Dock icon, or None where the system has no Dock.
Source§

fn text_services(&self) -> Option<&dyn TextServices>

The system services a selection toolbar offers, or None where the host has none.
Source§

fn restoration(&self) -> Option<&dyn Restoration>

Application state kept across relaunches, or None where the host has none.
Source§

fn app_exit(&self) -> Option<&dyn AppExit>

Quitting at the application’s own request, or None where the host cannot quit itself: a phone, a browser tab.
Source§

fn locales(&self) -> Vec<Locale>

The full system-reported supported locales of the device (Flutter PlatformDispatcher.locales), in order of preference; empty until the host reports them.
Source§

fn set_application_locale(&self, locale: &Locale)

Tells the host which locale the application resolved to (Flutter PlatformDispatcher.setApplicationLocale); the default drops it.
Source§

fn default_font_families(&self) -> Vec<String>

Flutter’s txt::GetDefaultFontFamilies(): the families text uses when its style names none, first match first. Read more
Source§

fn vsync_waiter(&self) -> Option<Arc<dyn VsyncWaiter>>

Flutter’s VsyncWaiter, for any screen: the refreshes the host draws the framework’s frames at, for a producer that paces by them, as a composition layer’s does. None for a host without screen ticks.
Source§

impl ViewEmbedder for TestPlatform

The views the app adds on layers, made at once at the metrics the app gives, and removed as their handles are dropped. The metrics, sight and input the app sends them later go nowhere: a test hands the framework what a host would make of them itself.

Source§

fn add_view( &self, _layer: &Arc<dyn CompositionLayer>, metrics: ViewMetrics, host: Rc<dyn ViewHost>, initial_data: Option<String>, ) -> Result<EmbeddedView, ViewError>

Flutter’s AddView, for the app: asks for a view that draws into layer, which the app made with the platform’s compositor, opaque or not, and places itself, at metrics, asking what it asks of the system of host. Constraints in metrics that are not tight leave the view’s size to its content, within them, and host hears it with each frame of a new size (ViewHost::view_size_changed). The view arrives as a window’s does, through EmbedderClient::view_added, carrying the handle’s request id (View::request_id) and initial_data (View::initial_data), which says what it is for, as a window’s does (Platform::request_view); it is in sight until the app says otherwise (EmbeddedView::set_in_sight), its frames follow the screen its metrics name, and it is removed when the handle is dropped. Refused at once, with ViewError::Unsupported, where the host cannot draw a view into layer.
Source§

fn send_pointer_reports(&self, _reports: Vec<PointerReport>)

Flutter’s SendPointerEvent, for the app: what pointing devices did over any view, a window’s included, which the framework hears as it hears the host’s own reports (EmbedderClient::pointer_reports), through the one converter that numbers every pointer. Each device of a forwarded stream (its mouse, trackpad and pen, and each touch from landing to lifting) takes a device number no other stream uses, a random 64-bit one for now, since the converter keeps one state per device number, a forwarding app’s own host numbers its devices as this one does, 0, 1, 2 upward, and two streams with no order between them would mix their devices’ states in one (native-surfaces decision 36).
Source§

fn send_view_focus_event(&self, _event: ViewFocusEvent)

Flutter’s SendViewFocusEvent, for the app: a view’s focus change, which the framework hears as it hears the host’s own (EmbedderClient::view_focus_changed), so that the keys the host reports go where the framework’s focus is.

Auto Trait Implementations§

§

impl !Freeze for TestPlatform

§

impl !RefUnwindSafe for TestPlatform

§

impl !Send for TestPlatform

§

impl !Sync for TestPlatform

§

impl !UnwindSafe for TestPlatform

§

impl Forget for TestPlatform

§

impl Move for TestPlatform

§

impl Unpin for TestPlatform

§

impl UnsafeUnpin for TestPlatform
where *const RcInner<dyn Fn(i64) -> (SignedDuration, String)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(i64) -> (SignedDuration, String)>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Screen>: UnsafeUnpin, PhantomData<Rc<dyn View>>: UnsafeUnpin, *const RcInner<RefCell<Vec<Rc<TestView>>>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<Vec<Rc<TestView>>>>>: UnsafeUnpin, PhantomData<ViewId>: UnsafeUnpin, *const ArcInner<TestDispatcher> is !null: UnsafeUnpin, PhantomData<ArcInner<TestDispatcher>>: UnsafeUnpin, *const RcInner<dyn Fn() -> Box<dyn FontSource>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn() -> Box<dyn FontSource>>>: UnsafeUnpin, *const RcInner<dyn Fn(Arc<[u8]>) -> Pin<Box<dyn Future<Output = Result<Box<dyn ImageCodec>, ImageDecodeError>>>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(Arc<[u8]>) -> Pin<Box<dyn Future<Output = Result<Box<dyn ImageCodec>, ImageDecodeError>>>>>>: UnsafeUnpin, *const RcInner<dyn Fn(PixelBuffer) -> Option<Image>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(PixelBuffer) -> Option<Image>>>: UnsafeUnpin, *const RcInner<dyn Fn(&DisplayList, u32, u32) -> Option<Image>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&DisplayList, u32, u32) -> Option<Image>>>: UnsafeUnpin, *const RcInner<dyn Fn(&Image) -> Pin<Box<dyn Future<Output = Result<PixelBuffer, ImageError>>>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&Image) -> Pin<Box<dyn Future<Output = Result<PixelBuffer, ImageError>>>>>>: UnsafeUnpin, *const RcInner<dyn Fn(&(dyn VideoFrame + 'static)) -> Option<Image>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&(dyn VideoFrame + 'static)) -> Option<Image>>>: UnsafeUnpin, *const RcInner<dyn Fn(&(dyn HardwareBuffer + 'static)) -> Option<Image>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&(dyn HardwareBuffer + 'static)) -> Option<Image>>>: UnsafeUnpin, *const RcInner<TestWindows> is !null: UnsafeUnpin, PhantomData<RcInner<TestWindows>>: UnsafeUnpin, *const RcInner<dyn Clipboard> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Clipboard>>: UnsafeUnpin, *const RcInner<dyn SystemChrome> is !null: UnsafeUnpin, PhantomData<RcInner<dyn SystemChrome>>: UnsafeUnpin, *const RcInner<dyn Haptics> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Haptics>>: UnsafeUnpin, *const RcInner<dyn SystemContextMenu> is !null: UnsafeUnpin, PhantomData<RcInner<dyn SystemContextMenu>>: UnsafeUnpin, *const RcInner<dyn MenuBar> is !null: UnsafeUnpin, PhantomData<RcInner<dyn MenuBar>>: UnsafeUnpin, *const RcInner<dyn PopupMenus> is !null: UnsafeUnpin, PhantomData<RcInner<dyn PopupMenus>>: UnsafeUnpin, *const RcInner<dyn TrayIcons> is !null: UnsafeUnpin, PhantomData<RcInner<dyn TrayIcons>>: UnsafeUnpin, *const RcInner<dyn FileDialogs> is !null: UnsafeUnpin, PhantomData<RcInner<dyn FileDialogs>>: UnsafeUnpin, *const RcInner<dyn HttpClient> is !null: UnsafeUnpin, PhantomData<RcInner<dyn HttpClient>>: UnsafeUnpin, *const RcInner<dyn Files> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Files>>: UnsafeUnpin, *const RcInner<dyn Opener> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Opener>>: UnsafeUnpin, *const RcInner<dyn Notifications> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Notifications>>: UnsafeUnpin, *const ArcInner<dyn Compositor> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Compositor>>: UnsafeUnpin, *const ArcInner<dyn HardwareBufferAllocator> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn HardwareBufferAllocator>>: UnsafeUnpin, *const RcInner<dyn Players> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Players>>: UnsafeUnpin, *const RcInner<dyn MediaAssets> is !null: UnsafeUnpin, PhantomData<RcInner<dyn MediaAssets>>: UnsafeUnpin, *const RcInner<dyn ImageCodecs> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ImageCodecs>>: UnsafeUnpin, *const RcInner<dyn VideoDecoders> is !null: UnsafeUnpin, PhantomData<RcInner<dyn VideoDecoders>>: UnsafeUnpin, *const RcInner<dyn Cameras> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Cameras>>: UnsafeUnpin, *const RcInner<dyn VideoFrameReaders> is !null: UnsafeUnpin, PhantomData<RcInner<dyn VideoFrameReaders>>: UnsafeUnpin, *const RcInner<dyn CaptionSettings> is !null: UnsafeUnpin, PhantomData<RcInner<dyn CaptionSettings>>: UnsafeUnpin, *const RcInner<dyn DockMenu> is !null: UnsafeUnpin, PhantomData<RcInner<dyn DockMenu>>: UnsafeUnpin, *const RcInner<dyn TextServices> is !null: UnsafeUnpin, PhantomData<RcInner<dyn TextServices>>: UnsafeUnpin, *const RcInner<dyn Restoration> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Restoration>>: UnsafeUnpin, *const RcInner<dyn AppExit> is !null: UnsafeUnpin, PhantomData<RcInner<dyn AppExit>>: UnsafeUnpin,

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

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> Upcast<T> for T

Source§

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