@@ -1373,7 +1373,7 @@ impl<R: Real> MeshAttribute<R> {
13731373
13741374 /// Converts the mesh attribute to a [`vtkio::model::Attribute`])
13751375 #[ cfg( feature = "vtk_extras" ) ]
1376- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1376+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
13771377 fn to_vtk_attribute ( & self ) -> Attribute {
13781378 match & self . data {
13791379 AttributeData :: ScalarU64 ( u64_vec) => {
@@ -1433,7 +1433,7 @@ where
14331433 for < ' a > & ' a MeshT : IntoVtkUnstructuredGridPiece ,
14341434{
14351435 /// Creates a [`vtkio::model::UnstructuredGridPiece`] representing this mesh including its attached [`MeshAttribute`]s
1436- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1436+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14371437 fn unstructured_grid ( & self ) -> UnstructuredGridPiece {
14381438 let mut grid_piece: UnstructuredGridPiece = ( & self . mesh ) . into_unstructured_grid ( ) ;
14391439 for point_attribute in & self . point_attributes {
@@ -1452,55 +1452,55 @@ where
14521452macro_rules! impl_into_vtk {
14531453 ( $name: tt) => {
14541454 #[ cfg( feature = "vtk_extras" ) ]
1455- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1455+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14561456 impl <R : Real > IntoVtkUnstructuredGridPiece for $name<R > {
14571457 fn into_unstructured_grid( self ) -> UnstructuredGridPiece {
14581458 vtk_helper:: mesh_to_unstructured_grid( & self )
14591459 }
14601460 }
14611461
14621462 #[ cfg( feature = "vtk_extras" ) ]
1463- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1463+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14641464 impl <R : Real > IntoVtkUnstructuredGridPiece for & $name<R > {
14651465 fn into_unstructured_grid( self ) -> UnstructuredGridPiece {
14661466 vtk_helper:: mesh_to_unstructured_grid( self )
14671467 }
14681468 }
14691469
14701470 #[ cfg( feature = "vtk_extras" ) ]
1471- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1471+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14721472 impl <' a, R : Real > IntoVtkUnstructuredGridPiece for std:: borrow:: Cow <' a, $name<R >> {
14731473 fn into_unstructured_grid( self ) -> UnstructuredGridPiece {
14741474 vtk_helper:: mesh_to_unstructured_grid( & self )
14751475 }
14761476 }
14771477
14781478 #[ cfg( feature = "vtk_extras" ) ]
1479- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1479+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14801480 impl <' a, R : Real > IntoVtkUnstructuredGridPiece for & std:: borrow:: Cow <' a, $name<R >> {
14811481 fn into_unstructured_grid( self ) -> UnstructuredGridPiece {
14821482 vtk_helper:: mesh_to_unstructured_grid( self )
14831483 }
14841484 }
14851485
14861486 #[ cfg( feature = "vtk_extras" ) ]
1487- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1487+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14881488 impl <R : Real > IntoVtkUnstructuredGridPiece for & MeshWithData <R , $name<R >> {
14891489 fn into_unstructured_grid( self ) -> UnstructuredGridPiece {
14901490 self . unstructured_grid( )
14911491 }
14921492 }
14931493
14941494 #[ cfg( feature = "vtk_extras" ) ]
1495- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1495+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
14961496 impl <R : Real > IntoVtkUnstructuredGridPiece for MeshWithData <R , $name<R >> {
14971497 fn into_unstructured_grid( self ) -> UnstructuredGridPiece {
14981498 self . unstructured_grid( )
14991499 }
15001500 }
15011501
15021502 #[ cfg( feature = "vtk_extras" ) ]
1503- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1503+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15041504 impl <' a, R : Real > IntoVtkUnstructuredGridPiece
15051505 for & MeshWithData <R , std:: borrow:: Cow <' a, $name<R >>>
15061506 {
@@ -1518,7 +1518,7 @@ impl_into_vtk!(PointCloud3d);
15181518
15191519/// Trait implementations to convert meshes into types supported by [`vtkio`]
15201520#[ cfg( feature = "vtk_extras" ) ]
1521- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1521+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15221522pub mod vtk_helper {
15231523 use vtkio:: model:: {
15241524 Attributes , CellType , Cells , DataSet , UnstructuredGridPiece , VertexNumbers ,
@@ -1530,20 +1530,20 @@ pub mod vtk_helper {
15301530 } ;
15311531
15321532 /// Trait that can be implemented by mesh cells to return the corresponding [`vtkio::model::CellType`]
1533- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1533+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15341534 pub trait HasVtkCellType {
15351535 /// Returns the corresponding [`vtkio::model::CellType`] of the cell
15361536 fn vtk_cell_type ( & self ) -> CellType ;
15371537 }
15381538
1539- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1539+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15401540 impl HasVtkCellType for TriangleCell {
15411541 fn vtk_cell_type ( & self ) -> CellType {
15421542 CellType :: Triangle
15431543 }
15441544 }
15451545
1546- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1546+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15471547 impl HasVtkCellType for TriangleOrQuadCell {
15481548 fn vtk_cell_type ( & self ) -> CellType {
15491549 match self {
@@ -1553,28 +1553,28 @@ pub mod vtk_helper {
15531553 }
15541554 }
15551555
1556- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1556+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15571557 impl HasVtkCellType for HexCell {
15581558 fn vtk_cell_type ( & self ) -> CellType {
15591559 CellType :: Hexahedron
15601560 }
15611561 }
15621562
1563- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1563+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15641564 impl HasVtkCellType for PointCell {
15651565 fn vtk_cell_type ( & self ) -> CellType {
15661566 CellType :: Vertex
15671567 }
15681568 }
15691569
15701570 /// Conversion of meshes into a [`vtkio::model::UnstructuredGridPiece`]
1571- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1571+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15721572 pub trait IntoVtkUnstructuredGridPiece {
15731573 fn into_unstructured_grid ( self ) -> UnstructuredGridPiece ;
15741574 }
15751575
15761576 /// Direct conversion of meshes into a full [`vtkio::model::DataSet`]
1577- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1577+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
15781578 pub trait IntoVtkDataSet {
15791579 fn into_dataset ( self ) -> DataSet ;
15801580 }
@@ -1598,7 +1598,7 @@ pub mod vtk_helper {
15981598 }
15991599
16001600 /// Converts any supported mesh to a [`vtkio::model::UnstructuredGridPiece`]
1601- #[ cfg_attr( doc_cfg , doc( cfg( feature = "vtk_extras" ) ) ) ]
1601+ #[ cfg_attr( docsrs , doc( cfg( feature = "vtk_extras" ) ) ) ]
16021602 pub fn mesh_to_unstructured_grid < ' a , R , MeshT > ( mesh : & ' a MeshT ) -> UnstructuredGridPiece
16031603 where
16041604 R : Real ,
0 commit comments