It's useful for when we don't need the loaded data, we just need it to be loaded. The function is a reduced version of the get_data without dealing with data that's already in memory and without returning anything.
An alternative is to make the get_data return a Result<Option<Arc<Vec<u8>>>> but that will complicate it even more, as we'll have to deal with and error and a some/none instead just an error.
Either way, it'll be good to have something like this, as it can allow to speed up a bit the "loading to memory" part as we will not receive data that'll be dropped immediately.
… the loading to memory part.
It's useful for when we don't need the loaded data, we just need it to be loaded. The function is a reduced version of the
get_data
without dealing with data that's already in memory and without returning anything.An alternative is to make the
get_data
return aResult<Option<Arc<Vec<u8>>>>
but that will complicate it even more, as we'll have to deal with and error and a some/none instead just an error.Either way, it'll be good to have something like this, as it can allow to speed up a bit the "loading to memory" part as we will not receive data that'll be dropped immediately.