Struct eframe::CreationContext
source · [−]pub struct CreationContext<'s> {
pub egui_ctx: Context,
pub integration_info: IntegrationInfo,
pub storage: Option<&'s dyn Storage>,
pub gl: Option<Arc<Context>>,
pub wgpu_render_state: Option<RenderState>,
}
Expand description
Data that is passed to AppCreator
that can be used to setup and initialize your app.
Fields
egui_ctx: Context
The egui Context.
You can use this to customize the look of egui, e.g to call egui::Context::set_fonts
,
egui::Context::set_visuals
etc.
integration_info: IntegrationInfo
Information about the surrounding environment.
storage: Option<&'s dyn Storage>
You can use the storage to restore app state(requires the “persistence” feature).
gl: Option<Arc<Context>>
The glow::Context
allows you to initialize OpenGL resources (e.g. shaders) that
you might want to use later from a [egui::PaintCallback
].
Only available when compiling with the glow
feature and using Renderer::Glow
.
wgpu_render_state: Option<RenderState>
The underlying WGPU render state.
Only available when compiling with the wgpu
feature and using Renderer::Wgpu
.
Can be used to manage GPU resources for custom rendering with WGPU using [egui::PaintCallback
]s.
Auto Trait Implementations
impl<'s> !RefUnwindSafe for CreationContext<'s>
impl<'s> !Send for CreationContext<'s>
impl<'s> !Sync for CreationContext<'s>
impl<'s> Unpin for CreationContext<'s>
impl<'s> !UnwindSafe for CreationContext<'s>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more