Struct warmy::Key [] [src]

pub struct Key<T> { /* fields omitted */ }

Key used to get resource.

This is the entry point of the Store. A key is a simple path with phantom typing, giving type hints on the target resource.

Note: because of being a key, you must not provide an absolute nor canonicalized path: instead, you pass local paths without any leading characters (drop any ./ for instance).

let the_key = Key::new("maps/deck_16/room_3.bsp");

Methods

impl<T> Key<T>
[src]

[src]

Create a new key from a local path, without leading special characters.

[src]

Get the underlying path.

This path is relative to the root path of the store the key is used in.

Trait Implementations

impl<T> Clone for Key<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Debug for Key<T>
[src]

[src]

Formats the value using the given formatter.

impl<T> Eq for Key<T>
[src]

impl<T> Hash for Key<T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> PartialEq for Key<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<T> CacheKey for Key<T> where
    T: 'static, 
[src]