Skip to main content

ParseAngle

Trait ParseAngle 

Source
pub trait ParseAngle {
    // Required method
    fn to_angle(&self) -> Result<Angle, AstroError>;
}
Expand description

Auto-detect and parse angle format.

Tries formats in order: HMS, then DMS, then decimal degrees. Use this for user input where format is unknown.

For coordinates with known semantics (RA vs Dec), prefer explicit .hms() or .dms() via AngleUnits.

Required Methods§

Source

fn to_angle(&self) -> Result<Angle, AstroError>

Parse angle, auto-detecting format.

Detection order: HMS -> DMS -> decimal degrees.

Implementations on Foreign Types§

Source§

impl ParseAngle for str

Implementors§