Struct fretboard_layout::Specs[][src]

pub struct Specs {
    pub scale: f64,
    pub count: u32,
    pub variant: Variant,
    pub nut: f64,
    pub bridge: f64,
    pub pfret: f64,
}
Expand description

This struct contains the user data used to create the svg output file

Fields

scale: f64

Scale length. For multiscale designs this is the bass side scale length.

count: u32

Number of frets to render

variant: Variant

Monoscale or Multiscale Right orLeft handed

nut: f64

The width of the fretboard at the nut.

bridge: f64

The string spacing at the bridge. Note that this is not the physical width of the bridge, but the distance perpendicular to the centerline between the outer two strings.

pfret: f64

The fret that is perpendicular to the centerline.

Implementations

Returns a multiscale Specs struct

Returns the length from bridge to fret for a given fret number, along both bass and treble sides of the board.

Returns a vector containing the lengths from bridge to fret for all of the frets to be rendered.

Returns the complete svg Document

Example
use fretboard_layout::{Config, Specs};

fn run() {
    let specs = Specs::default();
    let doc = specs.create_document(Some(Config::default()));
}

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.