Skip to main content

Crate use_periodic_table

Crate use_periodic_table 

Source
Expand description

§use-periodic-table

Periodic-table lookup and conservative classification helpers.
Direct period, group, and broad family helpers backed by the `use-element` static element table.

use-periodic-table exposes full element iteration, period and group filtering, atomic-number metadata helpers, and a small set of conservative chemical family checks.

§Surface

ItemPurpose
all_elements()Full static element slice
period_elements()Elements in a given period
group_elements()Elements in a given group
period_for_atomic_number()Period lookup from atomic number
group_for_atomic_number()Group lookup from atomic number
is_valid_atomic_number()Range check for 1 through 118
is_alkali_metal() and peersConservative broad-family helpers

§Examples

use use_periodic_table::{group_elements, is_noble_gas, period_elements};

assert_eq!(period_elements(2).len(), 8);
assert_eq!(group_elements(18).len(), 7);
assert!(is_noble_gas(10));

Periodic-table lookup and conservative classification helpers.

Structs§

Element
Small copyable element metadata suitable for direct lookup helpers.

Functions§

all_elements
Returns the full static element table in atomic-number order.
group_elements
Returns all elements in a group.
group_for_atomic_number
Returns the group for an atomic number.
is_actinide
Returns true for the actinides.
is_alkali_metal
Returns true for the alkali metals.
is_alkaline_earth_metal
Returns true for the alkaline earth metals.
is_halogen
Returns true for the halogens.
is_lanthanide
Returns true for the lanthanides.
is_noble_gas
Returns true for the noble gases.
is_valid_atomic_number
Returns true when the atomic number is in the supported range.
period_elements
Returns all elements in a period.
period_for_atomic_number
Returns the period for an atomic number.