Struct goods::LocalRegistry [−][src]
Collection of registered sources.
Used by Cache
to load new assets.
Implementations
impl<K> LocalRegistry<K> where
K: 'static,
[src]
K: 'static,
pub fn builder() -> LocalRegistryBuilder<K>
[src]
Create registry builder.
pub async fn read(&self, key: &K) -> Result<Box<[u8]>>
[src]
Try to read data for asset with specified key.
This method will try to read asset from all registered sources one-by-one.
Returns as soon as first source returns anything except SourceError::NotFound
.
This method ignores sources that return non-send futures.
Trait Implementations
impl<K> Clone for LocalRegistry<K>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<K> Debug for LocalRegistry<K>
[src]
Auto Trait Implementations
impl<K> !RefUnwindSafe for LocalRegistry<K>
[src]
impl<K> !Send for LocalRegistry<K>
[src]
impl<K> !Sync for LocalRegistry<K>
[src]
impl<K> Unpin for LocalRegistry<K>
[src]
impl<K> !UnwindSafe for LocalRegistry<K>
[src]
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,