[−][src]Struct keeshond_datapack::source::SourceManager
Holds a list of Source objects and selects one to use when loading a package
Implementations
impl SourceManager
[src]
pub fn new() -> SourceManager
[src]
Constructs a new, empty SourceManager
pub fn add_source(&mut self, source: Box<dyn Source>) -> SourceId
[src]
Adds the given Source to the end of the list.
pub fn source(&mut self, id: SourceId) -> Option<&mut Box<dyn Source>>
[src]
Returns a reference to the Source of the given ID.
pub fn get_package_source(
&mut self,
package_name: &str
) -> Option<&mut Box<dyn Source>>
[src]
&mut self,
package_name: &str
) -> Option<&mut Box<dyn Source>>
Retrieves a mutable reference to a Source that has the given package, going in reverse order of when they were added. If no suitable Source is available, returns None.
pub fn clear(&mut self)
[src]
Removes all sources from the manager. Existing source IDs are invalidated.
Auto Trait Implementations
impl !RefUnwindSafe for SourceManager
impl !Send for SourceManager
impl !Sync for SourceManager
impl Unpin for SourceManager
impl !UnwindSafe for SourceManager
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> Same<T> for T
[src]
type Output = T
Should always be 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>,