Trait secp256kfun::marker::Mark[][src]

pub trait Mark: Sized {
    fn mark<M: ChangeMark<Self>>(self) -> M::Out;
}
Expand description

A extension trait to add the mark method to all types so they can be marked with anything that implements ChangeMark against it.

Required methods

Returns a new instance of the invocant that will be marked with M.

Examples

use secp256kfun::{marker::*, Scalar};
let scalar = Scalar::random(&mut rand::thread_rng());
assert!(format!("{:?}", scalar).starts_with("Scalar<Secret,"));
let scalar = scalar.mark::<Public>(); // scalar is consumed
assert!(format!("{:?}", scalar).starts_with("Scalar<Public,"));

Implementors