Enum sic_cli_ops::operations::OperationId
source · [−]pub enum OperationId {
Show 21 variants
Blur,
Brighten,
Contrast,
Crop,
Diff,
Filter3x3,
FlipHorizontal,
FlipVertical,
Grayscale,
HueRotate,
HorizontalGradient,
Invert,
Overlay,
Resize,
Rotate90,
Rotate180,
Rotate270,
Unsharpen,
VerticalGradient,
PreserveAspectRatio,
SamplingFilter,
}
Expand description
The enumeration of all supported operations.
Variants
Blur
Brighten
Contrast
Crop
Diff
Filter3x3
FlipHorizontal
FlipVertical
Grayscale
HueRotate
HorizontalGradient
Invert
Overlay
Resize
Rotate90
Rotate180
Rotate270
Unsharpen
VerticalGradient
PreserveAspectRatio
SamplingFilter
Implementations
sourceimpl OperationId
impl OperationId
pub fn variants() -> &'static [&'static str]
pub fn try_from_name(input: &str) -> TResult<Self>
sourcepub fn takes_number_of_arguments(self) -> usize
pub fn takes_number_of_arguments(self) -> usize
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 =).
sourceimpl OperationId
impl OperationId
sourcepub fn create_instruction<'a, T>(
self,
inputs: T
) -> Result<Instr, SicCliOpsError> where
T: IntoIterator,
T::Item: Into<Describable<'a>> + Debug,
pub fn create_instruction<'a, T>(
self,
inputs: T
) -> Result<Instr, SicCliOpsError> where
T: IntoIterator,
T::Item: Into<Describable<'a>> + Debug,
Constructs instructions for image operations which are taken as input by the image engine.
Trait Implementations
sourceimpl Clone for OperationId
impl Clone for OperationId
sourcefn clone(&self) -> OperationId
fn clone(&self) -> OperationId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OperationId
impl Debug for OperationId
sourceimpl<'_derivative_strum> From<&'_derivative_strum OperationId> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum OperationId> for &'static str
sourcefn from(x: &'_derivative_strum OperationId) -> &'static str
fn from(x: &'_derivative_strum OperationId) -> &'static str
Converts to this type from the input type.
sourceimpl From<OperationId> for &'static str
impl From<OperationId> for &'static str
sourcefn from(x: OperationId) -> &'static str
fn from(x: OperationId) -> &'static str
Converts to this type from the input type.
sourceimpl FromStr for OperationId
impl FromStr for OperationId
type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
sourceimpl Hash for OperationId
impl Hash for OperationId
sourceimpl IntoEnumIterator for OperationId
impl IntoEnumIterator for OperationId
type Iterator = OperationIdIter
fn iter() -> OperationIdIterⓘNotable traits for OperationIdIterimpl Iterator for OperationIdIter type Item = OperationId;
sourceimpl PartialEq<OperationId> for OperationId
impl PartialEq<OperationId> for OperationId
sourceimpl TryFrom<&'_ str> for OperationId
impl TryFrom<&'_ str> for OperationId
type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
sourceimpl VariantNames for OperationId
impl VariantNames for OperationId
sourceconst VARIANTS: &'static [&'static str]
const VARIANTS: &'static [&'static str]
Names of the variants of this enum
impl Copy for OperationId
impl Eq for OperationId
impl StructuralEq for OperationId
impl StructuralPartialEq for OperationId
Auto Trait Implementations
impl RefUnwindSafe for OperationId
impl Send for OperationId
impl Sync for OperationId
impl Unpin for OperationId
impl UnwindSafe for OperationId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more