pub struct EditResponse {
pub individual_results: Vec<SingleEditResponse>,
}Expand description
Response from a scrobble edit operation that may affect multiple album variations.
When editing a track that appears on multiple albums, this response contains the results of all individual edit operations performed.
Fields§
§individual_results: Vec<SingleEditResponse>Results of individual edit operations
Implementations§
Source§impl EditResponse
impl EditResponse
Sourcepub fn single(
success: bool,
message: Option<String>,
album_info: Option<String>,
exact_scrobble_edit: ExactScrobbleEdit,
) -> Self
pub fn single( success: bool, message: Option<String>, album_info: Option<String>, exact_scrobble_edit: ExactScrobbleEdit, ) -> Self
Create a new EditResponse from a single result.
Sourcepub fn from_results(results: Vec<SingleEditResponse>) -> Self
pub fn from_results(results: Vec<SingleEditResponse>) -> Self
Create a new EditResponse from multiple results.
Sourcepub fn all_successful(&self) -> bool
pub fn all_successful(&self) -> bool
Check if all individual edit operations were successful.
Sourcepub fn any_successful(&self) -> bool
pub fn any_successful(&self) -> bool
Check if any individual edit operations were successful.
Sourcepub fn total_edits(&self) -> usize
pub fn total_edits(&self) -> usize
Get the total number of edit operations performed.
Sourcepub fn successful_edits(&self) -> usize
pub fn successful_edits(&self) -> usize
Get the number of successful edit operations.
Sourcepub fn failed_edits(&self) -> usize
pub fn failed_edits(&self) -> usize
Get the number of failed edit operations.
Sourcepub fn summary_message(&self) -> String
pub fn summary_message(&self) -> String
Generate a summary message describing the overall result.
Sourcepub fn detailed_messages(&self) -> Vec<String>
pub fn detailed_messages(&self) -> Vec<String>
Get detailed messages from all edit operations.
Sourcepub fn is_single_edit(&self) -> bool
pub fn is_single_edit(&self) -> bool
Check if this response represents a single edit (for backward compatibility).
Trait Implementations§
Source§impl Clone for EditResponse
impl Clone for EditResponse
Source§fn clone(&self) -> EditResponse
fn clone(&self) -> EditResponse
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditResponse
impl Debug for EditResponse
Source§impl<'de> Deserialize<'de> for EditResponse
impl<'de> Deserialize<'de> for EditResponse
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>,
Source§impl PartialEq for EditResponse
impl PartialEq for EditResponse
Source§impl Serialize for EditResponse
impl Serialize for EditResponse
impl Eq for EditResponse
impl StructuralPartialEq for EditResponse
Auto Trait Implementations§
impl Freeze for EditResponse
impl RefUnwindSafe for EditResponse
impl Send for EditResponse
impl Sync for EditResponse
impl Unpin for EditResponse
impl UnwindSafe for EditResponse
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.