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§
source§impl 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 =).
source§impl 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§
source§impl Clone for OperationId
impl Clone for OperationId
source§fn clone(&self) -> OperationId
fn clone(&self) -> OperationId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OperationId
impl Debug for OperationId
source§impl<'_derivative_strum> From<&'_derivative_strum OperationId> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum OperationId> for &'static str
source§fn from(x: &'_derivative_strum OperationId) -> &'static str
fn from(x: &'_derivative_strum OperationId) -> &'static str
Converts to this type from the input type.
source§impl From<OperationId> for &'static str
impl From<OperationId> for &'static str
source§fn from(x: OperationId) -> &'static str
fn from(x: OperationId) -> &'static str
Converts to this type from the input type.
source§impl FromStr for OperationId
impl FromStr for OperationId
source§impl Hash for OperationId
impl Hash for OperationId
source§impl IntoEnumIterator for OperationId
impl IntoEnumIterator for OperationId
type Iterator = OperationIdIter
fn iter() -> OperationIdIter ⓘ
source§impl PartialEq<OperationId> for OperationId
impl PartialEq<OperationId> for OperationId
source§fn eq(&self, other: &OperationId) -> bool
fn eq(&self, other: &OperationId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&str> for OperationId
impl TryFrom<&str> for OperationId
source§impl VariantNames for OperationId
impl VariantNames for OperationId
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more