[−][src]Struct secp256kfun::Slice
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
fn change_mark(bytes: Slice<'a, S>) -> Self::Out
[src]
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]
fn eq(&self, rhs: &Slice<'b, Public>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[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,
S: RefUnwindSafe,
impl<'a, S> Send for Slice<'a, S> where
S: Send,
S: Send,
impl<'a, S> Sync for Slice<'a, S> where
S: Sync,
S: Sync,
impl<'a, S> Unpin for Slice<'a, S> where
S: Unpin,
S: Unpin,
impl<'a, S> UnwindSafe for Slice<'a, S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, S, SNew> ChangeMark<Slice<'a, S>> for SNew where
S: Secrecy,
SNew: Secrecy,
[src]
S: Secrecy,
SNew: Secrecy,
type Out = Slice<'a, SNew>
The result type of marking T
with Self
fn change_mark(Slice<'a, S>) -> <SNew as ChangeMark<Slice<'a, S>>>::Out
[src]
impl<'a, S, SNew> ChangeMark<Slice<'a, S>> for SNew where
S: Secrecy,
SNew: Secrecy,
[src]
S: Secrecy,
SNew: Secrecy,
type Out = Slice<'a, SNew>
The result type of marking T
with Self
fn change_mark(Slice<'a, S>) -> <SNew as ChangeMark<Slice<'a, S>>>::Out
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Mark for T
[src]
#[must_use]fn mark<M>(Self) -> <M as ChangeMark<T>>::Out where
M: ChangeMark<T>,
[src]
M: ChangeMark<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,