pub struct Script<T>{
pub has_started: bool,
pub globals: Option<Box<dyn Global>>,
pub start: BoxedStartFn<T>,
pub frame: BoxedFrameFn<T>,
pub event_handler: Option<BoxedEventHandlerFn<T>>,
}
Expand description
A struct that provides a container for a scripts datatypes.
Fields§
§has_started: bool
§globals: Option<Box<dyn Global>>
§start: BoxedStartFn<T>
§frame: BoxedFrameFn<T>
§event_handler: Option<BoxedEventHandlerFn<T>>
Implementations§
Source§impl<T> Script<T>
impl<T> Script<T>
pub fn new_boxed( start: BoxedStartFn<T>, frame: BoxedFrameFn<T>, event_handler: Option<BoxedEventHandlerFn<T>>, ) -> Box<Script<T>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Script<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for Script<T>
impl<T> Send for Script<T>where
T: ?Sized,
impl<T> Sync for Script<T>where
T: ?Sized,
impl<T> Unpin for Script<T>where
T: ?Sized,
impl<T> !UnwindSafe for Script<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for T
impl<T> Content for T
Source§fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
Source§fn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.
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