@@ -81,7 +81,7 @@ impl Iterator for EngineIterator {
81
81
///
82
82
/// Whoever instantiates the struct must ensure it does not outlive the data it points to. The
83
83
/// compiler cannot help us here, because raw pointers don't have lifetimes. A good rule of thumb is
84
- /// to always use the [ `kernel_string_slice`] macro to create string slices, and to avoid returning
84
+ /// to always use the `kernel_string_slice` macro to create string slices, and to avoid returning
85
85
/// a string slice from a code block or function (since the move risks over-extending its lifetime):
86
86
///
87
87
/// ```ignore
@@ -331,6 +331,8 @@ pub unsafe extern "C" fn free_row_indexes(slice: KernelRowIndexArray) {
331
331
/// an opaque struct that encapsulates data read by an engine. this handle can be passed back into
332
332
/// some kernel calls to operate on the data, or can be converted into the raw data as read by the
333
333
/// [`delta_kernel::Engine`] by calling [`get_raw_engine_data`]
334
+ ///
335
+ /// [`get_raw_engine_data`]: crate::engine_data::get_raw_engine_data
334
336
#[ handle_descriptor( target=dyn EngineData , mutable=true ) ]
335
337
pub struct ExclusiveEngineData ;
336
338
@@ -353,12 +355,14 @@ pub trait ExternEngine: Send + Sync {
353
355
#[ handle_descriptor( target=dyn ExternEngine , mutable=false ) ]
354
356
pub struct SharedExternEngine ;
355
357
358
+ #[ cfg( any( feature = "default-engine" , feature = "sync-engine" ) ) ]
356
359
struct ExternEngineVtable {
357
360
// Actual engine instance to use
358
361
engine : Arc < dyn Engine > ,
359
362
allocate_error : AllocateErrorFn ,
360
363
}
361
364
365
+ #[ cfg( any( feature = "default-engine" , feature = "sync-engine" ) ) ]
362
366
impl Drop for ExternEngineVtable {
363
367
fn drop ( & mut self ) {
364
368
debug ! ( "dropping engine interface" ) ;
@@ -369,6 +373,7 @@ impl Drop for ExternEngineVtable {
369
373
///
370
374
/// Kernel doesn't use any threading or concurrency. If engine chooses to do so, engine is
371
375
/// responsible for handling any races that could result.
376
+ #[ cfg( any( feature = "default-engine" , feature = "sync-engine" ) ) ]
372
377
unsafe impl Send for ExternEngineVtable { }
373
378
374
379
/// # Safety
@@ -380,8 +385,10 @@ unsafe impl Send for ExternEngineVtable {}
380
385
/// Basically, by failing to implement these traits, we forbid the engine from being able to declare
381
386
/// its thread-safety (because rust assumes it is not threadsafe). By implementing them, we leave it
382
387
/// up to the engine to enforce thread safety if engine chooses to use threads at all.
388
+ #[ cfg( any( feature = "default-engine" , feature = "sync-engine" ) ) ]
383
389
unsafe impl Sync for ExternEngineVtable { }
384
390
391
+ #[ cfg( any( feature = "default-engine" , feature = "sync-engine" ) ) ]
385
392
impl ExternEngine for ExternEngineVtable {
386
393
fn engine ( & self ) -> Arc < dyn Engine > {
387
394
self . engine . clone ( )
@@ -677,8 +684,11 @@ pub struct StringSliceIterator;
677
684
678
685
/// # Safety
679
686
///
680
- /// The iterator must be valid (returned by [kernel_scan_data_init]) and not yet freed by
681
- /// [kernel_scan_data_free]. The visitor function pointer must be non-null.
687
+ /// The iterator must be valid (returned by [`kernel_scan_data_init`]) and not yet freed by
688
+ /// [`free_kernel_scan_data`]. The visitor function pointer must be non-null.
689
+ ///
690
+ /// [`kernel_scan_data_init`]: crate::scan::kernel_scan_data_init
691
+ /// [`free_kernel_scan_data`]: crate::scan::free_kernel_scan_data
682
692
#[ no_mangle]
683
693
pub unsafe extern "C" fn string_slice_next (
684
694
data : Handle < StringSliceIterator > ,
0 commit comments