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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

impl<T> Upcast<T> for T

§

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

§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more