pub struct Clip {Show 37 fields
pub id: String,
pub title: String,
pub audio_url: String,
pub image_url: String,
pub image_large_url: String,
pub video_url: String,
pub video_cover_url: String,
pub tags: String,
pub duration: f64,
pub play_count: u64,
pub status: String,
pub created_at: String,
pub display_name: String,
pub handle: String,
pub is_liked: bool,
pub is_trashed: bool,
pub has_vocal: bool,
pub clip_type: String,
pub prompt: String,
pub gpt_description_prompt: String,
pub lyrics: String,
pub model_name: String,
pub major_model_version: String,
pub album_title: String,
pub root_ancestor_id: String,
pub lineage_status: String,
pub edited_clip_id: String,
pub task: String,
pub is_remix: bool,
pub cover_clip_id: String,
pub upsample_clip_id: String,
pub remaster_clip_id: String,
pub speed_clip_id: String,
pub override_history_clip_id: String,
pub override_future_clip_id: String,
pub history: Vec<HistoryEntry>,
pub concat_history: Vec<HistoryEntry>,
}Expand description
One finished Suno track, flattened from the API’s nested response shape.
Fields§
§id: String§title: String§audio_url: String§image_url: String§image_large_url: String§video_url: String§video_cover_url: String§duration: f64§play_count: u64§status: String§created_at: String§display_name: String§handle: String§is_liked: bool§is_trashed: bool§has_vocal: bool§clip_type: String§prompt: String§gpt_description_prompt: String§lyrics: String§model_name: String§major_model_version: String§album_title: String§root_ancestor_id: String§lineage_status: String§edited_clip_id: String§task: String§is_remix: bool§cover_clip_id: String§upsample_clip_id: String§remaster_clip_id: String§speed_clip_id: String§override_history_clip_id: String§override_future_clip_id: String§history: Vec<HistoryEntry>§concat_history: Vec<HistoryEntry>Implementations§
Source§impl Clip
impl Clip
Sourcepub fn from_json(raw: &Value) -> Clip
pub fn from_json(raw: &Value) -> Clip
Build a Clip from one raw API clip object.
Clip-level fields and lineage live at the top level; content fields like
tags and duration live under metadata. Temporary audiopipe audio URLs
expire, so they are rewritten to the permanent CDN URL.
Sourcepub fn mp3_url(&self) -> String
pub fn mp3_url(&self) -> String
The MP3 source URL: the clip’s audio_url, or the deterministic CDN URL
when it is empty.
Sourcepub fn cover_candidates(&self) -> Vec<&str>
pub fn cover_candidates(&self) -> Vec<&str>
Cover-art URLs in preference order (large image, image, video cover), dropping any that are empty.
Sourcepub fn selected_image_url(&self) -> Option<&str>
pub fn selected_image_url(&self) -> Option<&str>
The preferred cover-art URL, or None when the clip carries no art.
Trait Implementations§
impl StructuralPartialEq for Clip
Auto Trait Implementations§
impl Freeze for Clip
impl RefUnwindSafe for Clip
impl Send for Clip
impl Sync for Clip
impl Unpin for Clip
impl UnsafeUnpin for Clip
impl UnwindSafe for Clip
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