From 4a3c38abf398b18f73d86830081b703a47b7423a Mon Sep 17 00:00:00 2001 From: hakki Date: Mon, 9 Sep 2024 18:11:07 +0200 Subject: [PATCH] specctra: added hyperlinks --- src/specctra/design.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/specctra/design.rs b/src/specctra/design.rs index 80ebc35..0cbe2dc 100644 --- a/src/specctra/design.rs +++ b/src/specctra/design.rs @@ -24,9 +24,14 @@ use crate::{ }; #[derive(Error, Debug)] + +/// Possible errors raised by [`SpecctraDesign::load`] pub enum LoadingError { + /// I/O file reading error from [`std::io::Error`] #[error(transparent)] Io(#[from] std::io::Error), + /// File parsing errors containing information about unexpected end of file, + /// or any other parsing issues with your DSN file #[error(transparent)] Parse(#[from] read::ParseError), } @@ -42,11 +47,11 @@ pub struct SpecctraDesign { } impl SpecctraDesign { - /// Reads a Specctra DSN file and initializes a `SpecctraDesign` instance. + /// Reads a Specctra DSN file and initializes a [`SpecctraDesign`] instance. /// /// # Errors /// - /// Returns a `LoadingError` if an I/O error occurs or if the file format is invalid. + /// Returns a [`LoadingError`] if an I/O error occurs or if the file format is invalid. pub fn load(reader: impl std::io::BufRead) -> Result { let mut list_reader = ListTokenizer::new(reader); let dsn = list_reader.read_value::()?; @@ -63,7 +68,7 @@ impl SpecctraDesign { /// /// # Errors /// - /// Returns an `std::io::Error` if an I/O error occurs while writing the SES file. + /// Returns an [`std::io::Error`] if an I/O error occurs while writing the SES file. pub fn write_ses( &self, board: &Board, @@ -170,7 +175,7 @@ impl SpecctraDesign { } - /// This method interprets the PCB design and generates a `Board` object + /// This method interprets the PCB design and generates a [`Board`] object /// containing the layout and associated Specctra mesadata . pub fn make_board(&self) -> Board { let mesadata = SpecctraMesadata::from_pcb(&self.pcb);