[][src]Struct secp256kfun::Slice

pub struct Slice<'a, S> { /* fields omitted */ }

Potentially secret bytes of arbitrary length.

This type exists so you can mark some bytes with a Secrecy. The only automatic effect this has is that equality comparison runs in constant time if either Slice is marked Secret.

Example

To crate a new Slice just mark any &[u8]

use secp256kfun::marker::*;
let bytes = b"a secret message";
let secret_slice = bytes.as_ref().mark::<Secret>();

Trait Implementations

impl<'a, S: Secrecy, SNew: Secrecy> ChangeMark<Slice<'a, S>> for SNew[src]

type Out = Slice<'a, SNew>

The result type of marking T with Self

impl<'a, S: Clone> Clone for Slice<'a, S>[src]

impl<'a, S: Copy> Copy for Slice<'a, S>[src]

impl<'a, S: Debug> Debug for Slice<'a, S>[src]

impl<S, '_> Display for Slice<'_, S>[src]

impl<'a, S> From<Slice<'a, S>> for &'a [u8][src]

impl<'a, S> HashInto for Slice<'a, S>[src]

impl<'a, 'b> PartialEq<Slice<'b, Public>> for Slice<'a, Public>[src]

impl<'a, 'b, S1, S2> PartialEq<Slice<'b, S2>> for Slice<'a, S1>[src]

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for Slice<'a, S> where
    S: RefUnwindSafe

impl<'a, S> Send for Slice<'a, S> where
    S: Send

impl<'a, S> Sync for Slice<'a, S> where
    S: Sync

impl<'a, S> Unpin for Slice<'a, S> where
    S: Unpin

impl<'a, S> UnwindSafe for Slice<'a, S> where
    S: UnwindSafe

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<'a, S, SNew> ChangeMark<Slice<'a, S>> for SNew where
    S: Secrecy,
    SNew: Secrecy
[src]

type Out = Slice<'a, SNew>

The result type of marking T with Self

impl<'a, S, SNew> ChangeMark<Slice<'a, S>> for SNew where
    S: Secrecy,
    SNew: Secrecy
[src]

type Out = Slice<'a, SNew>

The result type of marking T with Self

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

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

impl<T> Mark for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.