pub enum LevelData {
    SubLevels(Vec<ID>),
    Field(ID),
}
Expand description

Describes level data.

Variants§

§

SubLevels(Vec<ID>)

Level contains sublevels.

§

Field(ID)

Level contains QDF.

Implementations§

Tells if level contains sublevels.

Examples
use quantized_density_fields::LOD;

let lod = LOD::new(2, 1, 16);
assert!(lod.level(lod.root()).data().is_sublevels());

Tells if level contains QDF.

Examples
use quantized_density_fields::LOD;

let lod = LOD::new(2, 0, 16);
assert!(lod.level(lod.root()).data().is_field());

Gets sublevels or panics if does not contains sublevels.

Examples
use quantized_density_fields::LOD;

let lod = LOD::new(2, 1, 16);
assert_eq!(lod.level(lod.root()).data().as_sublevels().len(), 4);

Gets QDF or panics if does not contains QDF.

Examples
use quantized_density_fields::LOD;

let lod = LOD::new(2, 0, 16);
assert_eq!(*lod.field(lod.level(lod.root()).data().as_field()).state(), 16);

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.