[][src]Enum elliptic_curve::sec1::Tag

#[repr(u8)]pub enum Tag {
    CompressedEvenY,
    CompressedOddY,
    Uncompressed,
}

Tag byte used by the Elliptic-Curve-Point-to-Octet-String encoding.

Variants

CompressedEvenY

Compressed point with even y-coordinate (0x02)

CompressedOddY

Compressed point with odd y-coordinate (0x03)

Uncompressed

Uncompressed point (0x04)

Implementations

impl Tag[src]

pub fn from_u8(byte: u8) -> Result<Self, Error>[src]

Parse a tag value from a byte

pub fn is_compressed(self) -> bool[src]

Is this point compressed?

pub fn message_len(self, field_element_size: usize) -> usize[src]

Compute the expected total message length for a message prefixed with this tag (including the tag byte), given the field element size (in bytes) for a particular elliptic curve.

Trait Implementations

impl Clone for Tag[src]

impl Copy for Tag[src]

impl Debug for Tag[src]

impl Eq for Tag[src]

impl From<Tag> for u8[src]

impl PartialEq<Tag> for Tag[src]

impl StructuralEq for Tag[src]

impl StructuralPartialEq for Tag[src]

Auto Trait Implementations

impl RefUnwindSafe for Tag

impl Send for Tag

impl Sync for Tag

impl Unpin for Tag

impl UnwindSafe for Tag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.