[−][src]Struct speedruns::data::database::Linked
Wraps Model types to add references to the Database, adding new accessor methods.
Methods
impl<ModelType: Model> Linked<ModelType>
[src]
pub fn new(database: Arc<Database>, item: &'static ModelType) -> Self
[src]
pub fn as_static(&self) -> &'static ModelType
[src]
Returns the underlying static model instance reference.
impl Linked<Run>
[src]
pub fn time_ms(&self) -> u64
[src]
Returns the primary timing for this run.
pub fn game(&self) -> Linked<Game>
[src]
Returns the Linked
pub fn category(&self) -> Linked<Category>
[src]
Returns the Linked
pub fn level(&self) -> Option<Linked<Level>>
[src]
Returns Some(Linked
pub fn slug(&self) -> String
[src]
Returns a URL-safe slug identifying this run within its given game, category, and level (it may conflict with slugs in others).
pub fn users(&self) -> Vec<Linked<User>>
[src]
Returns Vec<Linked
impl Linked<Game>
[src]
pub fn runs(&self) -> Vec<Linked<Run>>
[src]
Returns a Vec of all the verified Runs for this Game.
pub fn per_game_category_by_slug(&self, slug: &str) -> Option<Linked<Category>>
[src]
pub fn per_level_category_by_slug(&self, slug: &str) -> Option<Linked<Category>>
[src]
pub fn level_by_slug(&self, slug: &str) -> Option<Linked<Level>>
[src]
impl Linked<Level>
[src]
impl Linked<Category>
[src]
pub fn game(&self) -> Linked<Game>
[src]
Returns the Linked
pub fn runs(&self) -> Vec<Linked<Run>>
[src]
pub fn full_runs(&self) -> Vec<Linked<Run>>
[src]
pub fn level_runs(&self, level: &Level) -> Vec<Linked<Run>>
[src]
Trait Implementations
impl<ModelType: Clone + 'static + Model + Debug> Clone for Linked<ModelType>
[src]
impl<ModelType: Debug + 'static + Model> Debug for Linked<ModelType>
[src]
impl<ModelType: Model> Deref for Linked<ModelType>
[src]
type Target = ModelType
The resulting type after dereferencing.
fn deref(&self) -> &ModelType
[src]
Deref to enable method delegation, but this loses the 'static lifetime.
impl<ModelType: 'static + Model + Debug> Serialize for Linked<ModelType> where
ModelType: Serialize,
[src]
ModelType: Serialize,
Auto Trait Implementations
impl<ModelType> RefUnwindSafe for Linked<ModelType> where
ModelType: RefUnwindSafe,
ModelType: RefUnwindSafe,
impl<ModelType> Send for Linked<ModelType> where
ModelType: Sync,
ModelType: Sync,
impl<ModelType> Sync for Linked<ModelType> where
ModelType: Sync,
ModelType: Sync,
impl<ModelType> Unpin for Linked<ModelType>
impl<ModelType> UnwindSafe for Linked<ModelType> where
ModelType: RefUnwindSafe,
ModelType: RefUnwindSafe,
Blanket Implementations
impl<T, A, P> Access<T> for P where
A: Access<T>,
P: Deref<Target = A>,
[src]
A: Access<T>,
P: Deref<Target = A>,
type Guard = <A as Access<T>>::Guard
A guard object containing the value and keeping it alive. Read more
fn load(&self) -> <P as Access<T>>::Guard
[src]
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, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
[src]
A: Access<T>,
<A as Access<T>>::Guard: 'static,
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
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,