pub struct FfiDetector { /* private fields */ }Expand description
Registry of all FFI binding detectors.
Implementations§
Source§impl FfiDetector
impl FfiDetector
Sourcepub fn add_binding(&mut self, binding: Box<dyn FfiBinding>)
pub fn add_binding(&mut self, binding: Box<dyn FfiBinding>)
Add a custom binding detector.
Sourcepub fn bindings(&self) -> &[Box<dyn FfiBinding>]
pub fn bindings(&self) -> &[Box<dyn FfiBinding>]
Get all registered bindings.
Sourcepub fn detect_modules(&self, path: &Path, content: &str) -> Vec<FfiModule>
pub fn detect_modules(&self, path: &Path, content: &str) -> Vec<FfiModule>
Detect FFI modules from a build file.
Sourcepub fn match_import<'a>(
&self,
import_module: &str,
import_name: &str,
known_modules: &'a [FfiModule],
) -> Option<(&'a FfiModule, &'static str)>
pub fn match_import<'a>( &self, import_module: &str, import_name: &str, known_modules: &'a [FfiModule], ) -> Option<(&'a FfiModule, &'static str)>
Check if an import matches any known FFI module.
Sourcepub fn is_consumer_extension(&self, ext: &str) -> bool
pub fn is_consumer_extension(&self, ext: &str) -> bool
Check if a file extension can consume FFI modules.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FfiDetector
impl !RefUnwindSafe for FfiDetector
impl Send for FfiDetector
impl Sync for FfiDetector
impl Unpin for FfiDetector
impl UnsafeUnpin for FfiDetector
impl !UnwindSafe for FfiDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request