Layer

Struct Layer 

Source
pub struct Layer { /* private fields */ }
Expand description

Layer struct

Implementations§

Source§

impl Layer

Source

pub fn new( visible: bool, frozen: bool, on_map: bool, color_rgb: u32, module: u32, dont_use_color: bool, color_flags: u32, button_off: bool, name: String, inherit: bool, scale_index: u32, min_track_radius: f64, max_track_grade: f64, tie_length: f64, tie_width: f64, tie_spacing: f64, ) -> Self

Initialize a layer

§Parameters:
  • visible is it visible?
  • frozen is it frozen?
  • on_map is it on map?
  • color_rgb its colot
  • module its module
  • dont_use_color don’t use color?
  • color_flags color flags
  • button_off is it button off?
  • name its name
  • inherit inherit?
  • scale_index its scale index
  • min_track_radius minimum track radious
  • max_track_grade maximum grade
  • tie_length tie length
  • tie_width tie width
  • tie_spacing tie spacing

Returns an initialized Layer struct.

Source

pub fn IsVisibleP(&self) -> bool

Is the layer visible?

§Parameters:

None

Returns Visiblity flag

Source

pub fn IsFrozenP(&self) -> bool

Is frozen?

§Parameters:

None

Returns frozen flag

Source

pub fn IsOnMapP(&self) -> bool

Is On Map?

§Parameters:

None

Returns on map flag

Source

pub fn Color(&self) -> u32

Layer color

§Parameters:

None

Returns layer’s color

Source

pub fn Module(&self) -> u32

Module

§Parameters:

None

Returns layer’s module

Source

pub fn DontUseColotP(&self) -> bool

Don’t use color?

§Parameters:

None

Returns layer’s Don’t use color flag

Source

pub fn ColorFlags(&self) -> u32

Color Flags

§Parameters:

None

Returns layer’s Color Flags

Source

pub fn IsButtonOffP(&self) -> bool

Is button off?

§Parameters:

None

Returns Is layer’s button off?

Source

pub fn Name(&self) -> String

Layer name

§Parameters:

None

Returns layer’s name

Source

pub fn InheritP(&self) -> bool

Inherit?

§Parameters:

None

Returns the layer’s inherit flag

Source

pub fn ScaleIndex(&self) -> u32

Scale Index

§Parameters:

None

Returns The layer’s scale index

Source

pub fn MinimumTrackRadius(&self) -> f64

Minimum track radius

§Parameters:

None

Returns the layer’s minimum track radius

Source

pub fn MaximumTrackGrade(&self) -> f64

Maximum Track Grade

§Parameters:

None

Returns the layer’s maximum track grade

Source

pub fn TieLength(&self) -> f64

Tie Length

§Parameters:

None

Returns the layer’s tie length

Source

pub fn TieWidth(&self) -> f64

Tie Width

§Parameters:

None

Returns the layer’s tie width

Source

pub fn TieSPacing(&self) -> f64

Tie spacing

§Parameters:

None

Returns the layer’s tie spacing

Trait Implementations§

Source§

impl Clone for Layer

Source§

fn clone(&self) -> Layer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Layer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Layer

Source§

fn default() -> Layer

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

impl Display for Layer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Display a Layer

§Parameters:
  • f formatter to write to

Returns a fmt::Result

Source§

impl PartialEq for Layer

Source§

fn eq(&self, other: &Layer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Layer

Auto Trait Implementations§

§

impl Freeze for Layer

§

impl RefUnwindSafe for Layer

§

impl Send for Layer

§

impl Sync for Layer

§

impl Unpin for Layer

§

impl UnwindSafe for Layer

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.