Struct secp256kfun::Slice [−][src]
pub struct Slice<'a, S = Public> { /* fields omitted */ }
Expand description
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
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for Slice<'a, S> where
S: RefUnwindSafe,
impl<'a, S> UnwindSafe for Slice<'a, S> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Marks item
with Self
.
Marks item
with Self
.
Returns a new instance of the invocant that will be marked with M
. Read more
type Output = T
type Output = T
Should always be Self