pub struct Map<E: Environment> {
kernel: Rc<Kernel<E>>,
schedule: Schedule,
map_context: CurrentMapContext,
window: <E::MapWindowConfig as MapWindowConfig>::MapWindow,
plugins: Vec<Box<dyn Plugin<E>>>,
}
Fields§
§kernel: Rc<Kernel<E>>
§schedule: Schedule
§map_context: CurrentMapContext
§window: <E::MapWindowConfig as MapWindowConfig>::MapWindow
§plugins: Vec<Box<dyn Plugin<E>>>
Implementations§
source§impl<E: Environment> Map<E>
impl<E: Environment> Map<E>
pub fn new( style: Style, kernel: Kernel<E>, renderer_builder: RendererBuilder, plugins: Vec<Box<dyn Plugin<E>>> ) -> Result<Self, MapError>
pub async fn initialize_renderer(&mut self) -> Result<(), MapError>
pub fn window_mut( &mut self ) -> &mut <E::MapWindowConfig as MapWindowConfig>::MapWindow
pub fn window(&self) -> &<E::MapWindowConfig as MapWindowConfig>::MapWindow
pub fn is_initialized(&self) -> bool
sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Resets the complete state of this map - a new renderer and schedule needs to be created. The complete state of the app is reset.
pub fn run_schedule(&mut self) -> Result<(), MapError>
pub fn context(&self) -> Result<&MapContext, MapError>
pub fn context_mut(&mut self) -> Result<&mut MapContext, MapError>
pub fn kernel(&self) -> &Rc<Kernel<E>>
Auto Trait Implementations§
impl<E> !Freeze for Map<E>
impl<E> !RefUnwindSafe for Map<E>
impl<E> !Send for Map<E>
impl<E> !Sync for Map<E>
impl<E> Unpin for Map<E>
impl<E> !UnwindSafe for Map<E>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more