Explanation of `iced::advanced::widget::tree::State`

Is there an explanation of how iced::advanced::widget::tree::State works somewhere? I’m guessing it allows one to specify some state for a widget that is persisted when the widget is recreated?

I’ve managed to used this State pattern by learning from the widget/ crate, but I don’t fully understand why and how it works. Any pointers appreciated.