mirror of https://codeberg.org/topola/topola.git
specctra: added hyperlinks
This commit is contained in:
parent
1fae63c8bd
commit
4a3c38abf3
|
|
@ -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<SpecctraDesign, LoadingError> {
|
||||
let mut list_reader = ListTokenizer::new(reader);
|
||||
let dsn = list_reader.read_value::<DsnFile>()?;
|
||||
|
|
@ -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<SpecctraMesadata>,
|
||||
|
|
@ -170,7 +175,7 @@ impl SpecctraDesign {
|
|||
}
|
||||
|
||||
|
||||
/// This method interprets the PCB design and generates a `Board<SpecctraMesadata>` object
|
||||
/// This method interprets the PCB design and generates a [`Board<SpecctraMesadata>`] object
|
||||
/// containing the layout and associated Specctra mesadata .
|
||||
pub fn make_board(&self) -> Board<SpecctraMesadata> {
|
||||
let mesadata = SpecctraMesadata::from_pcb(&self.pcb);
|
||||
|
|
|
|||
Loading…
Reference in New Issue