pub struct Extension { /* private fields */ }
Expand description
扩展实现 组装全局属性和插件
Implementations§
Source§impl Extension
impl Extension
pub fn new() -> Self
pub fn add_op_fn( &mut self, op_fn: Arc<dyn Fn(&GlobalResourceManager) -> ForgeResult<()> + Send + Sync>, ) -> &mut Self
pub fn get_op_fns( &self, ) -> Vec<Arc<dyn Fn(&GlobalResourceManager) -> ForgeResult<()> + Send + Sync>>
pub fn add_global_attribute(&mut self, item: GlobalAttributeItem) -> &mut Self
pub fn get_global_attributes(&self) -> &Vec<GlobalAttributeItem>
pub fn add_plugin(&mut self, plugin: Arc<Plugin>) -> &mut Self
pub fn get_plugins(&self) -> &Vec<Arc<Plugin>>
Trait Implementations§
impl Send for Extension
impl Sync for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl !RefUnwindSafe for Extension
impl Unpin for Extension
impl !UnwindSafe for Extension
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> 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