pub struct MusicConversion<T> {
pub value: T,
pub preserved: Vec<ObjectId>,
pub losses: Vec<ConversionLoss>,
}Expand description
Converted value with identity retention and complete loss evidence.
Fields§
§value: TConverted value.
preserved: Vec<ObjectId>Voice, note, and event identities retained in the result or its report.
losses: Vec<ConversionLoss>Facts not representable in the target form.
Implementations§
Source§impl<T> MusicConversion<T>
impl<T> MusicConversion<T>
Sourcepub fn map<U>(self, f: impl FnOnce(T) -> U) -> MusicConversion<U>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> MusicConversion<U>
Maps the converted value while retaining its audit report.
Sourcepub fn is_lossless(&self) -> bool
pub fn is_lossless(&self) -> bool
Returns true when no conversion loss was recorded.
Trait Implementations§
Source§impl<T: Clone> Clone for MusicConversion<T>
impl<T: Clone> Clone for MusicConversion<T>
Source§fn clone(&self) -> MusicConversion<T>
fn clone(&self) -> MusicConversion<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for MusicConversion<T>
impl<T: Debug> Debug for MusicConversion<T>
impl<T: Eq> Eq for MusicConversion<T>
Source§impl<T: PartialEq> PartialEq for MusicConversion<T>
impl<T: PartialEq> PartialEq for MusicConversion<T>
impl<T: PartialEq> StructuralPartialEq for MusicConversion<T>
Auto Trait Implementations§
impl<T> Freeze for MusicConversion<T>where
T: Freeze,
impl<T> RefUnwindSafe for MusicConversion<T>where
T: RefUnwindSafe,
impl<T> Send for MusicConversion<T>where
T: Send,
impl<T> Sync for MusicConversion<T>where
T: Sync,
impl<T> Unpin for MusicConversion<T>where
T: Unpin,
impl<T> UnsafeUnpin for MusicConversion<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MusicConversion<T>where
T: UnwindSafe,
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