[][src]Struct yy_boss::YyResourceHandler

pub struct YyResourceHandler<T: YyResource> { /* fields omitted */ }

Implementations

impl<T: YyResource> YyResourceHandler<T>[src]

pub fn set(
    &mut self,
    value: T,
    associated_data: T::AssociatedData,
    _frt: CreatedResource
) -> Option<YyResourceData<T>>
[src]

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 FilledResourcetoken, 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]

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]

Auto Trait Implementations

impl<T> RefUnwindSafe for YyResourceHandler<T> where
    T: RefUnwindSafe,
    <T as YyResource>::AssociatedData: RefUnwindSafe

impl<T> Send for YyResourceHandler<T> where
    T: Send,
    <T as YyResource>::AssociatedData: Send

impl<T> Sync for YyResourceHandler<T> where
    T: Sync,
    <T as YyResource>::AssociatedData: Sync

impl<T> Unpin for YyResourceHandler<T> where
    T: Unpin,
    <T as YyResource>::AssociatedData: Unpin

impl<T> UnwindSafe for YyResourceHandler<T> where
    T: UnwindSafe,
    <T as YyResource>::AssociatedData: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,