Based entirely on the documentation and not rust code. Pulled in handy Golang stuff where appropriate.