pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn open(path: &Path) -> Result<Self>
pub fn upsert(&self, station: &Station) -> Result<()>
pub fn bootstrap( &mut self, rows: &[Station], cancelled: impl FnMut() -> bool, ) -> Result<usize>
pub fn set_meta(&self, key: &str, value: &str) -> Result<()>
pub fn directory_count(&self) -> Result<usize>
pub fn incoming_count(&self) -> Result<usize>
pub fn begin_sync(&self) -> Result<()>
pub fn stage(&mut self, rows: &[Station]) -> Result<()>
pub fn finish_sync(&mut self) -> Result<usize>
pub fn revision(&self) -> Result<(u64, u64)>
pub fn meta(&self, key: &str) -> Result<Option<String>>
pub fn count(&self) -> Result<usize>
pub fn station(&self, uuid: &str) -> Result<Station>
Sourcepub fn station_position(
&self,
uuid: &str,
filter: &Filter,
) -> Result<Option<usize>>
pub fn station_position( &self, uuid: &str, filter: &Filter, ) -> Result<Option<usize>>
Locate a station without loading every preceding page into memory.
pub fn search(&self, filter: &Filter) -> Result<Vec<Station>>
pub fn random( &self, filter: &Filter, exclude: &[String], ) -> Result<Option<Station>>
pub fn facets(&self, kind: FacetKind, prefix: &str) -> Result<Vec<Facet>>
pub fn facets_limited( &self, kind: FacetKind, prefix: &str, limit: usize, ) -> Result<Vec<Facet>>
pub fn favorite(&self, uuid: &str, add: bool) -> Result<()>
pub fn toggle_favorite(&mut self, uuid: &str) -> Result<bool>
pub fn played(&self, uuid: &str) -> Result<()>
pub fn add_backup(&self, uuid: &str, url: &str) -> Result<()>
pub fn save_custom( &mut self, station: &Station, backups: Option<&[String]>, ) -> Result<()>
pub fn remove_custom( &mut self, uuid: &str, keep_references: bool, ) -> Result<bool>
pub fn update_backups( &mut self, uuid: &str, add: &[String], remove: &[String], ) -> Result<Vec<String>>
pub fn backups(&self, uuid: &str) -> Result<Vec<String>>
pub fn save_recording(&self, recording: &Recording) -> Result<()>
pub fn search_count(&self, filter: &Filter) -> Result<usize>
pub fn recordings(&self, limit: usize) -> Result<Vec<Recording>>
pub fn recordings_count(&self) -> Result<usize>
pub fn recording(&self, id: &str) -> Result<Recording>
pub fn remove_recording_index(&self, id: &str) -> Result<()>
pub fn recordings_page( &self, limit: usize, offset: usize, ) -> Result<Vec<Recording>>
pub fn unfinished_recordings(&self) -> Result<Vec<Recording>>
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl !Sync for Store
impl !UnwindSafe for Store
impl Send for Store
impl Unpin for Store
impl UnsafeUnpin for Store
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more