-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to figure out the correct format? #26
Comments
Actually, your approach normally is to be on look out for particular formats, that you need. it is iterator that returns raw id of format and you can compare it with constants Aside from some specific esoteric formats, most are pretty much self-explatory So if you have list of formats that you want to look out for, you can use: is_format_avail to query every format on list |
What I was looking for is some mapping from these lower level formats to the higher level ones, It says bitmap corresponds to Maybe even a method that returns all of the data in each available format. I can implement it myself for my project, but I think it's a bit of a hole in the API. |
I can create API like this: pub trait OnEnumerator {
fn on_string(text: String) -> {}
fn on_file_list(...) -> {}
//etc
} But that's not exactly convenient for use, but anything else would be inherently wasteful or overly complicated, and there is honestly little reason to enumerate all possible formats. If you can come up with API feel free to propose, but I do not really see much use when you can just iterate over formats and match on format identifier. |
There are a few formats to choose from, how can I know which ones are available before extracting?
I saw EnumFormats in the raw crate, but that seems too low level - it returns the underlying formats and not the ones defined in this crate.
The text was updated successfully, but these errors were encountered: