pub struct GlobalResourceManager {
pub resource_table: ResourceTable,
pub gotham_state: GothamState,
}Expand description
全局资源管理器 用于管理编辑器运行时的全局资源和状态
- resource_table: 资源表,管理所有注册的资源
- gotham_state: Gotham状态,管理特定于Gotham框架的状态
Fields§
§resource_table: ResourceTable§gotham_state: GothamStateImplementations§
Methods from Deref<Target = GothamState>§
pub fn get<T: Clone + Send + Sync + 'static>(&self) -> Option<Arc<T>>
pub fn try_get<T: Clone + Send + Sync + 'static>(&self) -> Option<Arc<T>>
pub fn try_take<T: Send + Sync + 'static>(&self) -> Option<Arc<T>>
Trait Implementations§
Source§impl Debug for GlobalResourceManager
impl Debug for GlobalResourceManager
Source§impl Default for GlobalResourceManager
impl Default for GlobalResourceManager
Source§fn default() -> GlobalResourceManager
fn default() -> GlobalResourceManager
Returns the “default value” for a type. Read more
Source§impl Deref for GlobalResourceManager
impl Deref for GlobalResourceManager
Auto Trait Implementations§
impl Freeze for GlobalResourceManager
impl !RefUnwindSafe for GlobalResourceManager
impl Send for GlobalResourceManager
impl Sync for GlobalResourceManager
impl Unpin for GlobalResourceManager
impl !UnwindSafe for GlobalResourceManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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