Enum Condition

Source
pub enum Condition {
    DataPattern(String),
    ModelMatch(String),
    MakeMatch(String),
    CountEquals(u32),
    CountRange(u32, u32),
    FormatEquals(String),
    Not(Box<Condition>),
    And(Vec<Condition>),
    Or(Vec<Condition>),
}
Expand description

Condition types for runtime processor selection ExifTool: Condition expressions in tag tables

Variants§

§

DataPattern(String)

Data pattern matching: $$valPt =~ /pattern/ ExifTool: Binary signature matching like $$valPt =~ /^0204/

§

ModelMatch(String)

Camera model matching: $$self{Model} =~ /pattern/ ExifTool: Model-specific table selection like $$self{Model} =~ /\b1DS?$/

§

MakeMatch(String)

Camera make matching: $$self{Make} =~ /pattern/ ExifTool: Manufacturer detection like $$self{Make} =~ /^Canon/

§

CountEquals(u32)

Count equality: $count == 368 ExifTool: Data structure size validation

§

CountRange(u32, u32)

Count range: $count >= min && $count <= max ExifTool: Flexible count validation for variable structures

§

FormatEquals(String)

Format equality: $format eq "undef" ExifTool: Format-based dispatch decisions

§

Not(Box<Condition>)

Negation: $$valPt!~/pattern/ ExifTool: Negative pattern matching

§

And(Vec<Condition>)

Logical AND: Multiple conditions must be true ExifTool: Complex conditional expressions

§

Or(Vec<Condition>)

Logical OR: Any condition must be true ExifTool: Alternative dispatch paths

Implementations§

Source§

impl Condition

Source

pub fn evaluate(&self, context: &EvalContext<'_>) -> bool

Evaluate condition against provided context ExifTool: Runtime condition evaluation in processor dispatch

Source

pub fn data_pattern(pattern: &str) -> Result<Self>

Create a data pattern condition from a regex string ExifTool: $$valPt =~ /pattern/ expressions

Source

pub fn model_match(pattern: &str) -> Result<Self>

Create a model matching condition from a regex string ExifTool: $$self{Model} =~ /pattern/ expressions

Source

pub fn make_match(pattern: &str) -> Result<Self>

Create a make matching condition from a regex string ExifTool: $$self{Make} =~ /pattern/ expressions

Source§

impl Condition

Common condition constructors for ExifTool patterns ExifTool: Frequently used condition patterns

Source

pub fn canon_1d_series() -> Self

Canon EOS 1D series detection ExifTool: $$self{Model} =~ /\b1DS?$/

Source

pub fn canon_1d_mark_ii() -> Self

Canon EOS 1D Mark II detection ExifTool: $$self{Model} =~ /\b1Ds? Mark II$/

Source

pub fn canon_1d_mark_iii() -> Self

Canon EOS 1D Mark III detection ExifTool: $$self{Model} =~ /\b1Ds? Mark III$/

Source

pub fn nikon_lens_data_0204() -> Self

Nikon LensData version 0204 detection ExifTool: $$valPt =~ /^0204/

Source

pub fn nikon_lens_data_0402() -> Self

Nikon LensData version 0402 detection ExifTool: $$valPt =~ /^0402/

Source

pub fn sony_camera_info_counts() -> Self

Sony CameraInfo count variants ExifTool: $count == 368 or $count == 5478

Source

pub fn canon_make() -> Self

Canon manufacturer detection ExifTool: $$self{Make} =~ /^Canon/

Source

pub fn sony_or_hasselblad_variant() -> Self

Sony manufacturer detection with Hasselblad variants ExifTool: $$self{Make}=~/^SONY/ or ($$self{Make}=~/^HASSELBLAD/ and $$self{Model}=~/^(HV|Stellar|Lusso|Lunar)/)

Trait Implementations§

Source§

impl Clone for Condition

Source§

fn clone(&self) -> Condition

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Condition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more