pub struct PlaylistEntity {
pub id: PlaylistEntityId,
pub list_id: PlaylistId,
pub track_id: TrackId,
pub database_uuid: DbUuid,
pub next_entity_id: PlaylistEntityId,
pub membership_reference: i64,
}Expand description
Entry in a Playlist.
The terminology used in the schema is confusing and the table
should have been named PlaylistEntry instead of PlaylistEntity.
Fields§
§id: PlaylistEntityId§list_id: PlaylistId§track_id: TrackId§database_uuid: DbUuid§next_entity_id: PlaylistEntityId§membership_reference: i64Implementations§
Source§impl PlaylistEntity
impl PlaylistEntity
Sourcepub fn fetch_all<'a>(
executor: impl SqliteExecutor<'a> + 'a,
) -> BoxStream<'a, Result<Self>>
pub fn fetch_all<'a>( executor: impl SqliteExecutor<'a> + 'a, ) -> BoxStream<'a, Result<Self>>
Fetches all PlaylistEntitys asynchronously.
Unfiltered and in no particular order.
Sourcepub fn fetch_list<'a>(
executor: impl SqliteExecutor<'a> + 'a,
list_id: PlaylistId,
) -> BoxStream<'a, Result<Self>>
pub fn fetch_list<'a>( executor: impl SqliteExecutor<'a> + 'a, list_id: PlaylistId, ) -> BoxStream<'a, Result<Self>>
Fetches all items of a list asynchronously.
In no particular order.
Sourcepub async fn try_load(
executor: impl SqliteExecutor<'_>,
id: PlaylistEntityId,
) -> Result<Option<Self>>
pub async fn try_load( executor: impl SqliteExecutor<'_>, id: PlaylistEntityId, ) -> Result<Option<Self>>
Loads a single PlaylistEntity by ID.
Returns Ok(None) if the requested PlaylistEntity has not been found.
Trait Implementations§
Source§impl Clone for PlaylistEntity
impl Clone for PlaylistEntity
Source§fn clone(&self) -> PlaylistEntity
fn clone(&self) -> PlaylistEntity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlaylistEntity
impl Debug for PlaylistEntity
Source§impl<'a, R: Row> FromRow<'a, R> for PlaylistEntitywhere
&'a str: ColumnIndex<R>,
PlaylistEntityId: Decode<'a, R::Database> + Type<R::Database>,
PlaylistId: Decode<'a, R::Database> + Type<R::Database>,
TrackId: Decode<'a, R::Database> + Type<R::Database>,
DbUuid: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for PlaylistEntitywhere
&'a str: ColumnIndex<R>,
PlaylistEntityId: Decode<'a, R::Database> + Type<R::Database>,
PlaylistId: Decode<'a, R::Database> + Type<R::Database>,
TrackId: Decode<'a, R::Database> + Type<R::Database>,
DbUuid: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for PlaylistEntity
impl RefUnwindSafe for PlaylistEntity
impl Send for PlaylistEntity
impl Sync for PlaylistEntity
impl Unpin for PlaylistEntity
impl UnwindSafe for PlaylistEntity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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