Skip to main content

Module services

Module services 

Source
Expand description

Services plugins share, by typed token.

use egui_pop_api::services::ServiceToken;

pub struct Clock { pub ticks: u64 }
pub const CLOCK: ServiceToken<Clock> = ServiceToken::new("demo.clock");
assert_eq!(CLOCK.id().as_str(), "demo.clock");

Structs§

ServiceToken
A service’s id and type: ctx.service(&TOKEN, value) provides it, app.service(&TOKEN) gets it back typed.