Struct database::mediafile::UpdateMediaFile
source · pub struct UpdateMediaFile {Show 16 fields
pub media_id: Option<i64>,
pub target_file: Option<String>,
pub raw_name: Option<String>,
pub raw_year: Option<i64>,
pub quality: Option<String>,
pub codec: Option<String>,
pub container: Option<String>,
pub audio: Option<String>,
pub original_resolution: Option<String>,
pub duration: Option<i64>,
pub channels: Option<i64>,
pub profile: Option<String>,
pub audio_language: Option<String>,
pub episode: Option<i64>,
pub season: Option<i64>,
pub corrupt: Option<bool>,
}
Expand description
Same as MediaFile
except its missing the id and library_id fields. Everything is
optional too.
Fields§
§media_id: Option<i64>
§target_file: Option<String>
§raw_name: Option<String>
§raw_year: Option<i64>
§quality: Option<String>
§codec: Option<String>
§container: Option<String>
§audio: Option<String>
§original_resolution: Option<String>
§duration: Option<i64>
§channels: Option<i64>
§profile: Option<String>
§audio_language: Option<String>
§episode: Option<i64>
§season: Option<i64>
§corrupt: Option<bool>
Implementations§
source§impl UpdateMediaFile
impl UpdateMediaFile
sourcepub async fn update(
&self,
conn: &mut Transaction<'_>,
id: i64
) -> Result<usize, DatabaseError>
pub async fn update(
&self,
conn: &mut Transaction<'_>,
id: i64
) -> Result<usize, DatabaseError>
Method updates the columns of a mediafile entry with what is supplied. The row is selected based on its id.
Arguments
conn
- mutable reference to a sqlx transaction._id
- id of the mediafile row we are targetting
Trait Implementations§
source§impl Clone for UpdateMediaFile
impl Clone for UpdateMediaFile
source§fn clone(&self) -> UpdateMediaFile
fn clone(&self) -> UpdateMediaFile
Returns a copy 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 UpdateMediaFile
impl Debug for UpdateMediaFile
source§impl Default for UpdateMediaFile
impl Default for UpdateMediaFile
source§fn default() -> UpdateMediaFile
fn default() -> UpdateMediaFile
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for UpdateMediaFile
impl<'de> Deserialize<'de> for UpdateMediaFile
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more