pub struct Scripts {
pub scripts: Vec<Script>,
}Expand description
Project scripts.
Fields§
§scripts: Vec<Script>Implementations§
Source§impl Scripts
impl Scripts
pub fn new() -> Self
Sourcepub fn get(&self, rid: &ResourceId) -> Option<&Script>
pub fn get(&self, rid: &ResourceId) -> Option<&Script>
Gets a Script by its ResourceId if it is registered,
otherwise returns None.
Sourcepub fn contains(&self, rid: &ResourceId) -> bool
pub fn contains(&self, rid: &ResourceId) -> bool
Returns whether a script with the given id is registered.
Sourcepub fn contains_path(&self, path: &ResourcePath) -> bool
pub fn contains_path(&self, path: &ResourcePath) -> bool
Returns whether a script with the given path is registered.
Sourcepub fn by_path(&self, path: &ResourcePath) -> Option<&Script>
pub fn by_path(&self, path: &ResourcePath) -> Option<&Script>
Gets a script by its path if it is registered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scripts
impl RefUnwindSafe for Scripts
impl Send for Scripts
impl Sync for Scripts
impl Unpin for Scripts
impl UnwindSafe for Scripts
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