Deep struct to hash