@@ -907,8 +907,12 @@ macro_rules! impl_builder {
907907 self . builder. $name( $( $var) ,* ) ; self
908908 }
909909 } ;
910- ( $plist: ident: $name: ident( $( $var: ident: $ty: ty) ,* ) ) => {
910+ ( $( #[ cfg( feature = $feature: literal) ] ) *
911+ $( #[ cfg( all( feature = $feature2: literal, $feature3: ident) ) ] ) *
912+ $plist: ident: $name: ident( $( $var: ident: $ty: ty) ,* ) ) => {
911913 paste:: paste! {
914+ $( #[ cfg( feature = $feature ) ] ) *
915+ $( #[ cfg( all( feature = $feature2, $feature3) ) ] ) *
912916 #[ inline] #[ must_use] #[ doc =
913917 "\u{21b3} [`" $plist "Builder::" $name "`]"
914918 "(crate::plist::" $plist "Builder::" $name ")"
@@ -918,8 +922,9 @@ macro_rules! impl_builder {
918922 }
919923 }
920924 } ;
921- ( $plist: ident: $name: ident<$( $gid: ident: $gty: path) ,+>( $( $var: ident: $ty: ty) ,* ) ) => {
925+ ( $( # [ cfg ( feature = $feature : literal ) ] ) * $ plist: ident: $name: ident<$( $gid: ident: $gty: path) ,+>( $( $var: ident: $ty: ty) ,* ) ) => {
922926 paste:: paste! {
927+ $( #[ cfg( feature = $feature ) ] ) *
923928 #[ inline] #[ must_use] #[ doc =
924929 "\u{21b3} [`" $plist "Builder::" $name "`]"
925930 "(crate::plist::" $plist "Builder::" $name ")"
@@ -938,14 +943,13 @@ macro_rules! impl_builder_methods {
938943 impl_builder!( DatasetAccess : access/dapl) ;
939944
940945 impl_builder!( DatasetAccess : chunk_cache( nslots: usize , nbytes: usize , w0: f64 ) ) ;
941- #[ cfg( feature = "1.8.17" ) ]
942- impl_builder!( DatasetAccess : efile_prefix( prefix: & str ) ) ;
943- #[ cfg( feature = "1.10.0" ) ]
944- impl_builder!( DatasetAccess : virtual_view( view: VirtualView ) ) ;
945- #[ cfg( feature = "1.10.0" ) ]
946- impl_builder!( DatasetAccess : virtual_printf_gap( gap_size: usize ) ) ;
947- #[ cfg( all( feature = "1.10.0" , have_parallel) ) ]
948- impl_builder!( DatasetAccess : all_coll_metadata_ops( is_collective: bool ) ) ;
946+ impl_builder!( #[ cfg( feature = "1.8.17" ) ] DatasetAccess : efile_prefix( prefix: & str ) ) ;
947+ impl_builder!( #[ cfg( feature = "1.10.0" ) ] DatasetAccess : virtual_view( view: VirtualView ) ) ;
948+ impl_builder!( #[ cfg( feature = "1.10.0" ) ] DatasetAccess : virtual_printf_gap( gap_size: usize ) ) ;
949+ impl_builder!(
950+ #[ cfg( all( feature = "1.10.0" , have_parallel) ) ]
951+ DatasetAccess : all_coll_metadata_ops( is_collective: bool )
952+ ) ;
949953
950954 impl_builder!( DatasetCreate : create/dcpl) ;
951955
@@ -956,24 +960,35 @@ macro_rules! impl_builder_methods {
956960 impl_builder!( DatasetCreate : szip( coding: SZip , px_per_block: u8 ) ) ;
957961 impl_builder!( DatasetCreate : nbit( ) ) ;
958962 impl_builder!( DatasetCreate : scale_offset( mode: ScaleOffset ) ) ;
959- #[ cfg( feature = "lzf" ) ]
960- impl_builder!( DatasetCreate : lzf( ) ) ;
961- #[ cfg( feature = "blosc" ) ]
963+ impl_builder!( #[ cfg( feature = "lzf" ) ] DatasetCreate : lzf( ) ) ;
962964 impl_builder!(
965+ #[ cfg( feature = "blosc" ) ]
963966 DatasetCreate : blosc( complib: Blosc , clevel: u8 , shuffle: impl Into <BloscShuffle >)
964967 ) ;
965- #[ cfg( feature = "blosc" ) ]
966- impl_builder!( DatasetCreate : blosc_blosclz( clevel: u8 , shuffle: impl Into <BloscShuffle >) ) ;
967- #[ cfg( feature = "blosc" ) ]
968- impl_builder!( DatasetCreate : blosc_lz4( clevel: u8 , shuffle: impl Into <BloscShuffle >) ) ;
969- #[ cfg( feature = "blosc" ) ]
970- impl_builder!( DatasetCreate : blosc_lz4hc( clevel: u8 , shuffle: impl Into <BloscShuffle >) ) ;
971- #[ cfg( feature = "blosc" ) ]
972- impl_builder!( DatasetCreate : blosc_snappy( clevel: u8 , shuffle: impl Into <BloscShuffle >) ) ;
973- #[ cfg( feature = "blosc" ) ]
974- impl_builder!( DatasetCreate : blosc_zlib( clevel: u8 , shuffle: impl Into <BloscShuffle >) ) ;
975- #[ cfg( feature = "blosc" ) ]
976- impl_builder!( DatasetCreate : blosc_zstd( clevel: u8 , shuffle: impl Into <BloscShuffle >) ) ;
968+ impl_builder!(
969+ #[ cfg( feature = "blosc" ) ]
970+ DatasetCreate : blosc_blosclz( clevel: u8 , shuffle: impl Into <BloscShuffle >)
971+ ) ;
972+ impl_builder!(
973+ #[ cfg( feature = "blosc" ) ]
974+ DatasetCreate : blosc_lz4( clevel: u8 , shuffle: impl Into <BloscShuffle >)
975+ ) ;
976+ impl_builder!(
977+ #[ cfg( feature = "blosc" ) ]
978+ DatasetCreate : blosc_lz4hc( clevel: u8 , shuffle: impl Into <BloscShuffle >)
979+ ) ;
980+ impl_builder!(
981+ #[ cfg( feature = "blosc" ) ]
982+ DatasetCreate : blosc_snappy( clevel: u8 , shuffle: impl Into <BloscShuffle >)
983+ ) ;
984+ impl_builder!(
985+ #[ cfg( feature = "blosc" ) ]
986+ DatasetCreate : blosc_zlib( clevel: u8 , shuffle: impl Into <BloscShuffle >)
987+ ) ;
988+ impl_builder!(
989+ #[ cfg( feature = "blosc" ) ]
990+ DatasetCreate : blosc_zstd( clevel: u8 , shuffle: impl Into <BloscShuffle >)
991+ ) ;
977992 impl_builder!( DatasetCreate : add_filter( id: H5Z_filter_t , cdata: & [ c_uint] ) ) ;
978993 impl_builder!( DatasetCreate : clear_filters( ) ) ;
979994 impl_builder!( DatasetCreate : alloc_time( alloc_time: Option <AllocTime >) ) ;
@@ -984,11 +999,10 @@ macro_rules! impl_builder_methods {
984999 impl_builder!( * : chunk_min_kb( size: usize ) ) ;
9851000 impl_builder!( DatasetCreate : no_chunk( ) ) ;
9861001 impl_builder!( DatasetCreate : layout( layout: Layout ) ) ;
987- #[ cfg( feature = "1.10.0" ) ]
988- impl_builder!( DatasetCreate : chunk_opts( opts: ChunkOpts ) ) ;
1002+ impl_builder!( #[ cfg( feature = "1.10.0" ) ] DatasetCreate : chunk_opts( opts: ChunkOpts ) ) ;
9891003 impl_builder!( DatasetCreate : external( name: & str , offset: usize , size: usize ) ) ;
990- #[ cfg( feature = "1.10.0" ) ]
9911004 impl_builder!(
1005+ #[ cfg( feature = "1.10.0" ) ]
9921006 DatasetCreate : virtual_map<
9931007 F : AsRef <str >, D : AsRef <str >,
9941008 E1 : Into <Extents >, S1 : Into <Selection >, E2 : Into <Extents >, S2 : Into <Selection >
0 commit comments