driver: factor out a helper and make another helper public
driver: factor out a helper and make another helper public

GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust