[−][src]Struct speedruns::data::database::Database
A collection of Tables with various generated indexes.
Methods
impl Database
[src]
pub fn tables(&self) -> &&'static Tables
[src]
pub fn last_updated(&self) -> &DateTime<Utc>
[src]
pub fn runs_by_game_id_and_category_id_and_level_id(
&self
) -> &BTreeMap<(u64, u64, Option<u64>), Vec<&'static Run>>
[src]
&self
) -> &BTreeMap<(u64, u64, Option<u64>), Vec<&'static Run>>
pub fn per_game_categories_by_game_id_and_slug(
&self
) -> &BTreeMap<(u64, String), &'static Category>
[src]
&self
) -> &BTreeMap<(u64, String), &'static Category>
pub fn per_level_categories_by_game_id_and_slug(
&self
) -> &BTreeMap<(u64, String), &'static Category>
[src]
&self
) -> &BTreeMap<(u64, String), &'static Category>
impl Database
[src]
pub fn link<ModelType: Model>(
self: &Arc<Self>,
item: &'static ModelType
) -> Linked<ModelType>
[src]
self: &Arc<Self>,
item: &'static ModelType
) -> Linked<ModelType>
pub fn new(tables: &'static Tables) -> Result<Arc<Self>, IntegrityErrors>
[src]
Creates a new Database indexing a collection of static tables.
pub fn validate(self: &Arc<Self>) -> Result<(), IntegrityErrors>
[src]
pub fn runs(self: &Arc<Self>) -> impl Iterator<Item = Linked<Run>>
[src]
Iterator over all Linked
pub fn run_by_id(self: &Arc<Self>, id: u64) -> Option<Linked<Run>>
[src]
Finds a Linked
pub fn runs_by_game_id(self: &Arc<Self>, game_id: u64) -> Vec<Linked<Run>>
[src]
Returns a Vec of Linked
pub fn users(self: &Arc<Self>) -> impl Iterator<Item = Linked<User>>
[src]
Iterator over all Linked
pub fn user_by_id(self: &Arc<Self>, id: u64) -> Option<Linked<User>>
[src]
Finds a Linked
pub fn user_by_slug(self: &Arc<Self>, slug: &str) -> Option<Linked<User>>
[src]
Finds a Linked
pub fn games(self: &Arc<Self>) -> impl Iterator<Item = Linked<Game>>
[src]
Iterator over all Linked
pub fn game_by_id(self: &Arc<Self>, id: u64) -> Option<Linked<Game>>
[src]
Finds a Game
pub fn game_by_slug(self: &Arc<Self>, slug: &str) -> Option<Linked<Game>>
[src]
Finds a Linked
pub fn levels_by_game_id(self: &Arc<Self>, game_id: u64) -> Vec<Linked<Level>>
[src]
pub fn level_by_game_id_and_slug(
self: &Arc<Self>,
game_id: u64,
slug: &str
) -> Option<Linked<Level>>
[src]
self: &Arc<Self>,
game_id: u64,
slug: &str
) -> Option<Linked<Level>>
Finds a level with the given name and game ID.
pub fn levels(self: &Arc<Self>) -> impl Iterator<Item = Linked<Level>>
[src]
Iterator over all Linked
pub fn level_by_id(self: &Arc<Self>, id: u64) -> Option<Linked<Level>>
[src]
Finds a Level
pub fn category_by_id(self: &Arc<Self>, id: u64) -> Option<Linked<Category>>
[src]
An iterator over all Linked
pub fn per_game_category_by_game_id_and_slug(
self: &Arc<Self>,
game_id: u64,
slug: &str
) -> Option<Linked<Category>>
[src]
self: &Arc<Self>,
game_id: u64,
slug: &str
) -> Option<Linked<Category>>
Finds a per-game category with the given slug and game ID.
pub fn per_level_category_by_game_id_and_slug(
self: &Arc<Self>,
game_id: u64,
slug: &str
) -> Option<Linked<Category>>
[src]
self: &Arc<Self>,
game_id: u64,
slug: &str
) -> Option<Linked<Category>>
Finds a per-level category with the given slug and game ID.
pub fn categories(self: &Arc<Self>) -> impl Iterator<Item = Linked<Category>>
[src]
Iterator over all Linked
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
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
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>,