pub struct TrackDB {
pub id: u64,
pub artist: String,
pub title: String,
pub album: String,
pub genre: String,
pub file: String,
pub duration: Duration,
pub name: String,
pub ext: String,
pub directory: String,
pub last_modified: String,
pub last_position: Duration,
}
Expand description
A struct representing a Track
in the database
Fields§
§id: u64
§artist: String
§title: String
§album: String
§genre: String
§file: String
§duration: Duration
§name: String
§ext: String
§directory: String
§last_modified: String
§last_position: Duration
Implementations§
Source§impl TrackDB
impl TrackDB
Sourcepub fn try_from_row_id(row: &Row<'_>) -> Result<Self, Error>
pub fn try_from_row_id(row: &Row<'_>) -> Result<Self, Error>
Try to convert a given row to a TrackDB
instance, expecting correct row order.
Use Self::try_from_row_named
if possible.
Trait Implementations§
impl StructuralPartialEq for TrackDB
Auto Trait Implementations§
impl Freeze for TrackDB
impl RefUnwindSafe for TrackDB
impl Send for TrackDB
impl Sync for TrackDB
impl Unpin for TrackDB
impl UnwindSafe for TrackDB
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request