#[cfg(feature = "std")]
use std::error::Error;
use core::fmt;
#[derive(Debug, Clone, Copy)]
pub struct InvalidCoordinate;
impl fmt::Display for InvalidCoordinate {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("invalid coordinate")
}
}
#[cfg(feature = "std")]
impl Error for InvalidCoordinate {}
#[derive(Debug, Clone, Copy)]
pub struct InvalidPoint;
impl fmt::Display for InvalidPoint {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("invalid point")
}
}
#[cfg(feature = "std")]
impl Error for InvalidPoint {}
#[derive(Debug, Clone, Copy)]
pub struct InvalidScalar;
impl fmt::Display for InvalidScalar {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("invalid scalar")
}
}
#[cfg(feature = "std")]
impl Error for InvalidScalar {}
#[derive(Debug, Clone, Copy)]
pub struct ZeroPoint;
impl fmt::Display for ZeroPoint {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("zero point")
}
}
#[cfg(feature = "std")]
impl Error for ZeroPoint {}
#[derive(Debug, Clone, Copy)]
pub struct ZeroScalar;
impl fmt::Display for ZeroScalar {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("zero scalar")
}
}
#[cfg(feature = "std")]
impl Error for ZeroScalar {}