The osm submodule contains definition of the basic data types used throughout the library.
There are five classes representing the basic OSM entities.
Line geometries in OSM are simply a sequence of nodes. To simplify processing osmium returns such node sequences using a special datatype that contains a reference to the node id and also the location geometry. The latter is only valid if the node locations have been cached by a location handler.
Some of the attributes of the OSM entities are represented with more complex classes.