pub trait InputAdapter: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn supported_formats(&self) -> Vec<&'static str>;
fn can_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 InputSource,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn parse<'life0, 'async_trait>(
&'life0 self,
input: InputSource,
) -> Pin<Box<dyn Future<Output = Result<ContextNode>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn wave_signature(&self) -> Option<String> { ... }
}Expand description
Trait for all input adapters
Required Methods§
Sourcefn supported_formats(&self) -> Vec<&'static str>
fn supported_formats(&self) -> Vec<&'static str>
Supported input formats/extensions
Sourcefn can_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 InputSource,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn can_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 InputSource,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Can this adapter handle the given input?
Sourcefn parse<'life0, 'async_trait>(
&'life0 self,
input: InputSource,
) -> Pin<Box<dyn Future<Output = Result<ContextNode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn parse<'life0, 'async_trait>(
&'life0 self,
input: InputSource,
) -> Pin<Box<dyn Future<Output = Result<ContextNode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Parse input into context nodes
Provided Methods§
Sourcefn wave_signature(&self) -> Option<String>
fn wave_signature(&self) -> Option<String>
Get quantum wave signature if applicable