[−][src]Struct yy_boss::YyResourceHandler
Implementations
impl<T: YyResource> YyResourceHandler<T>
[src]
pub fn set(
&mut self,
value: T,
associated_data: T::AssociatedData,
_frt: CreatedResource
) -> Option<YyResourceData<T>>
[src]
&mut self,
value: T,
associated_data: T::AssociatedData,
_frt: CreatedResource
) -> Option<YyResourceData<T>>
Adds a new sprite into the game. It requires a CreatedResource
,
which is created from the YypBoss
, which guarantees that the resource
has been created in the Yyp.
This operation is used to add
or to replace
the resource. If it is used
to replace a resource, the resource will be returned.
pub fn get(&self, name: &str, _crt: CreatedResource) -> Option<T>
[src]
Returns the data on the sprite yy, if it exists.
In general, this will return a Some
, but if users add
a resource, without using the FilledResource
token, then this will return a None
.
You can check if this is possible beforehand by checking the YypBoss
's prunable state.
pub fn remove(
&mut self,
value: &FilesystemPath,
_rrt: RemovedResource
) -> Option<YyResourceData<T>>
[src]
&mut self,
value: &FilesystemPath,
_rrt: RemovedResource
) -> Option<YyResourceData<T>>
Removes the resource out of the handler. If that resource was being used, then this will return that resource.
Trait Implementations
impl<T: Debug + YyResource> Debug for YyResourceHandler<T>
[src]
impl<T: Default + YyResource> Default for YyResourceHandler<T>
[src]
fn default() -> YyResourceHandler<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for YyResourceHandler<T> where
T: RefUnwindSafe,
<T as YyResource>::AssociatedData: RefUnwindSafe,
T: RefUnwindSafe,
<T as YyResource>::AssociatedData: RefUnwindSafe,
impl<T> Send for YyResourceHandler<T> where
T: Send,
<T as YyResource>::AssociatedData: Send,
T: Send,
<T as YyResource>::AssociatedData: Send,
impl<T> Sync for YyResourceHandler<T> where
T: Sync,
<T as YyResource>::AssociatedData: Sync,
T: Sync,
<T as YyResource>::AssociatedData: Sync,
impl<T> Unpin for YyResourceHandler<T> where
T: Unpin,
<T as YyResource>::AssociatedData: Unpin,
T: Unpin,
<T as YyResource>::AssociatedData: Unpin,
impl<T> UnwindSafe for YyResourceHandler<T> where
T: UnwindSafe,
<T as YyResource>::AssociatedData: UnwindSafe,
T: UnwindSafe,
<T as YyResource>::AssociatedData: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,