pub enum OperationId {
Show 23 variants
Blur,
Brighten,
Contrast,
Crop,
Diff,
DrawText,
Filter3x3,
FlipHorizontal,
FlipVertical,
Grayscale,
HueRotate,
HorizontalGradient,
Invert,
Overlay,
Resize,
Rotate90,
Rotate180,
Rotate270,
Threshold,
Unsharpen,
VerticalGradient,
PreserveAspectRatio,
SamplingFilter,
}Expand description
The enumeration of all supported operations.
Variants§
Blur
Brighten
Contrast
Crop
Diff
DrawText
Filter3x3
FlipHorizontal
FlipVertical
Grayscale
HueRotate
HorizontalGradient
Invert
Overlay
Resize
Rotate90
Rotate180
Rotate270
Threshold
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>
pub fn create_instruction<'a, T>( self, inputs: T, ) -> Result<Instr, SicCliOpsError>
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 duplicate 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 for OperationId
impl PartialEq for OperationId
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 StructuralPartialEq for OperationId
Auto Trait Implementations§
impl Freeze for OperationId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.