Refactor errors
This commit is contained in:
@@ -7,6 +7,12 @@ pub trait ObjectExtractor: Send + Sync {
|
||||
/// Get the field at `name` from `item`.
|
||||
/// - returns `None` if `name` is not a valid field
|
||||
/// - returns `Some(Null)` if `name` is not available
|
||||
///
|
||||
/// For extractors that parse binary, this fn should return
|
||||
/// an error only if we failed to obtain the data we need (permission denied, etc).
|
||||
///
|
||||
/// If the underlying data has an invalid format (e.g, running a pdf extractor on a non-pdf file),
|
||||
/// this fn should return `Ok(Some(None))`.
|
||||
async fn field(
|
||||
&self,
|
||||
name: &pile_config::Label,
|
||||
|
||||
Reference in New Issue
Block a user