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

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

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

pub fn mark<M: ChangeMark<Self>>(self) -> M::Out[src]

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,"));
Loading content...

Implementors

impl<T> Mark for T[src]

Loading content...