pub enum Entity {
Show 17 variants
Cne3(Cne3),
Live(Live),
Midi(Midi),
OrganPreset(OrganPreset),
Piano(Piano),
PianoLibrary(Cbin<RawBody>),
PianoPreset(PianoPreset),
PipeLibrary(Cbin<RawBody>),
Performance(Performance),
Program(Program),
Sample(Sample),
SampleProject(Project),
Settings(Settings),
Song(Song),
Synth(Synth),
Sysex(Sysex),
Bundle(Bundle),
}Expand description
One decoded file.
The decoded program variants are much the largest: a decoded panel holds its fields and the bytes it came from. Left unboxed — one of these exists per file being read, never in a collection.
Variants§
Cne3(Cne3)
An Electro 2 sample library — the one non-CBIN library format.
Live(Live)
Midi(Midi)
A MIDI carrier for a Lead SysEx bank, verbatim.
OrganPreset(OrganPreset)
Piano(Piano)
A piano library (npno).
PianoLibrary(Cbin<RawBody>)
A Stage Classic piano library (nsp). ⚠️ Megabytes, allocated whole —
cbin::inspect answers container questions in O(1).
PianoPreset(PianoPreset)
PipeLibrary(Cbin<RawBody>)
A C2 pipe-organ library (npip). Same caution as Entity::PianoLibrary.
Performance(Performance)
Program(Program)
Sample(Sample)
SampleProject(Project)
A Nord Sample Editor project (.nsmpproj) — the text file the editor
saves and generates an nsmp from.
Settings(Settings)
Song(Song)
Synth(Synth)
Sysex(Sysex)
A Lead 1/2/2X/3 SysEx dump, verbatim.
Bundle(Bundle)
Implementations§
Source§impl Entity
impl Entity
Sourcepub fn raw(&self) -> Option<&Cbin<RawBody>>
pub fn raw(&self) -> Option<&Cbin<RawBody>>
The container of a stub-backed entity — every variant whose body is
container-verified but undecoded. None for the decoded formats and the
non-CBIN carriers.
Sourcepub fn registry(&self) -> Option<&dyn Registry>
pub fn registry(&self) -> Option<&dyn Registry>
The generated field registry behind this entity, for reading.
None for the container-verified stubs and the non-panel carriers.
Sourcepub fn registry_mut(&mut self) -> Option<&mut dyn Registry>
pub fn registry_mut(&mut self) -> Option<&mut dyn Registry>
The registry again, for setting fields. The same bodies answer both: a body that lists its fields but refuses to set them cannot be declared here.