mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
Document and implement Debug for EventLoopWindowTarget
This commit is contained in:
@@ -35,6 +35,11 @@ pub struct EventLoop<T: 'static> {
|
|||||||
pub(crate) _marker: ::std::marker::PhantomData<*mut ()> // Not Send nor Sync
|
pub(crate) _marker: ::std::marker::PhantomData<*mut ()> // Not Send nor Sync
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Target that associates windows with an `EventLoop`.
|
||||||
|
///
|
||||||
|
/// This type exists to allow you to create new windows while Winit executes your callback.
|
||||||
|
/// `EventLoop` will coerce into this type, so functions that take this as a parameter can also
|
||||||
|
/// take `&EventLoop`.
|
||||||
pub struct EventLoopWindowTarget<T: 'static> {
|
pub struct EventLoopWindowTarget<T: 'static> {
|
||||||
pub(crate) p: platform_impl::EventLoopWindowTarget<T>,
|
pub(crate) p: platform_impl::EventLoopWindowTarget<T>,
|
||||||
pub(crate) _marker: ::std::marker::PhantomData<*mut ()> // Not Send nor Sync
|
pub(crate) _marker: ::std::marker::PhantomData<*mut ()> // Not Send nor Sync
|
||||||
@@ -46,6 +51,12 @@ impl<T> fmt::Debug for EventLoop<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> fmt::Debug for EventLoopWindowTarget<T> {
|
||||||
|
fn fmt(&self, fmtr: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
fmtr.pad("EventLoopWindowTarget { .. }")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Set by the user callback given to the `EventLoop::run` method.
|
/// Set by the user callback given to the `EventLoop::run` method.
|
||||||
///
|
///
|
||||||
/// Indicates the desired behavior of the event loop after [`Event::EventsCleared`][events_cleared]
|
/// Indicates the desired behavior of the event loop after [`Event::EventsCleared`][events_cleared]
|
||||||
|
|||||||
Reference in New Issue
Block a user