pub struct Remapper {
    pub eq_mapping: EqMapping,
    pub instrument_mapping: InstrumentMapping,
    pub table_mapping: TableMapping,
    pub phrase_mapping: PhraseMapping,
    pub chain_mapping: ChainMapping,
}Fields§
§eq_mapping: EqMapping§instrument_mapping: InstrumentMapping§table_mapping: TableMapping§phrase_mapping: PhraseMapping§chain_mapping: ChainMappingImplementations§
Source§impl Remapper
 
impl Remapper
pub fn default_ver(ver: Version) -> Self
pub fn describe<T: RemapperDescriptorBuilder>(&self, builder: &mut T)
pub fn out_chain(&self, chain_id: u8) -> u8
pub fn print(&self) -> String
Sourcepub fn create<'a, IT>(
    from_song: &Song,
    to_song: &Song,
    chains: IT,
) -> Result<Remapper, String>
 
pub fn create<'a, IT>( from_song: &Song, to_song: &Song, chains: IT, ) -> Result<Remapper, String>
Examples found in repository?
examples/read_song.rs (line 26)
15fn run() -> Result<(), Box<dyn Error>> {
16    let args: Vec<String> = env::args().collect();
17
18    let mut ffrom = File::open("./examples/songs/TRACKEQ.m8s")?;
19    let from = Song::read(&mut ffrom)?;
20
21    let mut fto = File::open("./examples/songs/V6EMPTY.m8s")?;
22    let mut to = Song::read(&mut fto)?;
23
24
25    let mut remapper =
26        Remapper::create(&from, &to, vec![0].iter());
27
28    remapper.unwrap().apply(&from, &mut to);
29    // dbg!(&song.eqs);
30
31    Ok(())
32}Sourcepub fn renumber(&self, song: &mut Song)
 
pub fn renumber(&self, song: &mut Song)
Same as apply but the same song is the source and destination
Sourcepub fn apply(&self, from: &Song, to: &mut Song)
 
pub fn apply(&self, from: &Song, to: &mut Song)
apply the reampping, cannot fail once mapping has been created
Examples found in repository?
examples/read_song.rs (line 28)
15fn run() -> Result<(), Box<dyn Error>> {
16    let args: Vec<String> = env::args().collect();
17
18    let mut ffrom = File::open("./examples/songs/TRACKEQ.m8s")?;
19    let from = Song::read(&mut ffrom)?;
20
21    let mut fto = File::open("./examples/songs/V6EMPTY.m8s")?;
22    let mut to = Song::read(&mut fto)?;
23
24
25    let mut remapper =
26        Remapper::create(&from, &to, vec![0].iter());
27
28    remapper.unwrap().apply(&from, &mut to);
29    // dbg!(&song.eqs);
30
31    Ok(())
32}Auto Trait Implementations§
impl Freeze for Remapper
impl RefUnwindSafe for Remapper
impl Send for Remapper
impl Sync for Remapper
impl Unpin for Remapper
impl UnwindSafe for Remapper
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