Enum tugger_code_signing::SignableCandidate[][src]

pub enum SignableCandidate<'a> {
    Path(Cow<'a, Path>),
    Data(Cow<'a, [u8]>),
    Forced(Signable),
}

Represents an entity that is a candidate for signing.

Most users will want to use Self::Path or Self::Data, which will go through signability checks and only turn into signable entities if we have a high degree of confidence that they can be signed.

The Self::Forced variant can be used to forcefully skip signability validation and supply your own Signability. Use this when our signability heuristics fail (please consider reporting these scenarios as bugs!). This variant is also useful for testing.

Variants

Path(Cow<'a, Path>)

A filesystem path.

Will be checked for signability.

Data(Cow<'a, [u8]>)

A slice of data in memory.

Will be checked for signability.

Forced(Signable)

Entity whose Signable is already computed.

Trait Implementations

impl<'a> From<&'a [u8]> for SignableCandidate<'a>[src]

fn from(b: &'a [u8]) -> Self[src]

Performs the conversion.

impl<'a> From<&'a Path> for SignableCandidate<'a>[src]

fn from(p: &'a Path) -> Self[src]

Performs the conversion.

impl<'a> From<PathBuf> for SignableCandidate<'static>[src]

fn from(p: PathBuf) -> Self[src]

Performs the conversion.

impl<'a> From<Vec<u8, Global>> for SignableCandidate<'static>[src]

fn from(data: Vec<u8>) -> Self[src]

Performs the conversion.

impl<'a> TryFrom<&'_ File> for SignableCandidate<'static>[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(file: &File) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl<'a> TryFrom<&'_ FileData> for SignableCandidate<'static>[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(file: &FileData) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl<'a> TryFrom<&'_ FileEntry> for SignableCandidate<'static>[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(entry: &FileEntry) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl<'a> TryFrom<File> for SignableCandidate<'static>[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(file: File) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl<'a> TryFrom<FileData> for SignableCandidate<'static>[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(file: FileData) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl<'a> TryFrom<FileEntry> for SignableCandidate<'static>[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(entry: FileEntry) -> Result<Self, Self::Error>[src]

Performs the conversion.

Auto Trait Implementations

impl<'a> RefUnwindSafe for SignableCandidate<'a>

impl<'a> Send for SignableCandidate<'a>

impl<'a> Sync for SignableCandidate<'a>

impl<'a> Unpin for SignableCandidate<'a>

impl<'a> UnwindSafe for SignableCandidate<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]