pub struct Environment<GS>where
GS: GlobalState,{ /* private fields */ }Implementations§
Source§impl<GS: GlobalState> Environment<GS>
impl<GS: GlobalState> Environment<GS>
pub fn new() -> Self
pub fn get_image_information(&self, id: &Id) -> Option<&ImageInformation>
pub fn insert_image(&mut self, id: Id, image: ImageInformation)
pub fn get_overlay(&mut self, id: &String) -> Option<Box<dyn Widget<GS>>>
pub fn add_overlay(&mut self, id: &str, overlay: Box<dyn Widget<GS>>)
pub fn clear(&mut self)
pub fn update_local_state<T: Serialize + Clone + Debug + DeserializeOwned>( &self, local_state: &mut dyn State<T, GS>, )
pub fn insert_local_state<T: Serialize + Clone + Debug>( &mut self, local_state: &dyn State<T, GS>, )
pub fn insert_local_state_from_key_value<T: Serialize + Clone + Debug>( &mut self, key: &String, value: &T, )
pub fn get_fonts_map(&self) -> &Map
pub fn insert_font_from_file<P>(&mut self, path: P) -> Result<Id, Error>
pub fn get_font(&self, id: Id) -> &Font<'static>
Sourcepub fn insert_font(&mut self, font: Font<'static>) -> Id
pub fn insert_font(&mut self, font: Font<'static>) -> Id
Adds the given rusttype::Font to the Map and returns a unique Id for it.
pub fn push_vec(&mut self, value: Vec<EnvironmentVariable>)
pub fn push(&mut self, value: EnvironmentVariable)
pub fn pop(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<GS> Freeze for Environment<GS>
impl<GS> !RefUnwindSafe for Environment<GS>
impl<GS> !Send for Environment<GS>
impl<GS> !Sync for Environment<GS>
impl<GS> Unpin for Environment<GS>
impl<GS> !UnwindSafe for Environment<GS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more