[][src]Enum naut_cli_ops::operations::OperationId

pub enum OperationId {
    Blur,
    Brighten,
    Contrast,
    Crop,
    Diff,
    Filter3x3,
    FlipHorizontal,
    FlipVertical,
    Grayscale,
    HueRotate,
    Invert,
    Overlay,
    Resize,
    Rotate90,
    Rotate180,
    Rotate270,
    Unsharpen,
    PreserveAspectRatio,
    SamplingFilter,
}

The enumeration of all supported operations.

Variants

Blur
Brighten
Contrast
Crop
Diff
Filter3x3
FlipHorizontal
FlipVertical
Grayscale
HueRotate
Invert
Overlay
Resize
Rotate90
Rotate180
Rotate270
Unsharpen
PreserveAspectRatio
SamplingFilter

Implementations

impl OperationId[src]

pub fn as_str(self) -> &'static str[src]

A string representation for each operation.

pub fn try_from_name(input: &str) -> TResult<Self>[src]

pub fn takes_number_of_arguments(self) -> usize[src]

Provides the number of arguments an operation takes. Used to unify arguments together. E.g. (without accounting for the requirement of having incremental indices as well), say we receive for resize the values 10, 20, 100 and 100. With the number of values we know that each resize operation takes two arguments, not four. So it could be that there are two operations, namely resize 10 20 and resize 100 100. We do need to take some other conditions into account, but they are not relevant for this particular method =).

impl OperationId[src]

pub fn create_instruction<'a, T>(
    self,
    inputs: T
) -> Result<Instr, SicCliOpsError> where
    T: IntoIterator,
    T::Item: Into<Describable<'a>> + Debug
[src]

Constructs instructions for image operations which are taken as input by the image engine.

Trait Implementations

impl AsStaticRef<str> for OperationId[src]

impl Clone for OperationId[src]

impl Copy for OperationId[src]

impl Debug for OperationId[src]

impl Eq for OperationId[src]

impl FromStr for OperationId[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for OperationId[src]

impl IntoEnumIterator for OperationId[src]

impl PartialEq<OperationId> for OperationId[src]

impl StructuralEq for OperationId[src]

impl StructuralPartialEq for OperationId[src]

impl VariantNames for OperationId[src]

Auto Trait Implementations

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<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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.