Skip to main content

Value

Enum Value 

Source
#[non_exhaustive]
pub enum Value {
Show 18 variants Byte(u8), Short(u16), SignedByte(i8), SignedShort(i16), Signed(i32), SignedBig(i64), Unsigned(u32), UnsignedBig(u64), Float(f32), Double(f64), List(Vec<Value>), Rational(u32, u32), RationalBig(u64, u64), SRational(i32, i32), SRationalBig(i64, i64), Ascii(String), Ifd(u32), IfdBig(u64),
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Byte(u8)

§

Short(u16)

§

SignedByte(i8)

§

SignedShort(i16)

§

Signed(i32)

§

SignedBig(i64)

§

Unsigned(u32)

§

UnsignedBig(u64)

§

Float(f32)

§

Double(f64)

§

List(Vec<Value>)

§

Rational(u32, u32)

§

RationalBig(u64, u64)

👎Deprecated since 0.11.1: Not implemented in BigTIFF with a standard tag value
§

SRational(i32, i32)

§

SRationalBig(i64, i64)

👎Deprecated since 0.11.1: Not implemented in BigTIFF with a standard tag value
§

Ascii(String)

§

Ifd(u32)

§

IfdBig(u64)

Implementations§

Source§

impl Value

Source

pub fn into_u8(self) -> TiffResult<u8>

Source

pub fn into_i8(self) -> TiffResult<i8>

Source

pub fn into_u16(self) -> TiffResult<u16>

Source

pub fn into_i16(self) -> TiffResult<i16>

Source

pub fn into_u32(self) -> TiffResult<u32>

Source

pub fn into_i32(self) -> TiffResult<i32>

Source

pub fn into_u64(self) -> TiffResult<u64>

Source

pub fn into_i64(self) -> TiffResult<i64>

Source

pub fn into_f32(self) -> TiffResult<f32>

Source

pub fn into_f64(self) -> TiffResult<f64>

Source

pub fn into_ifd_pointer(self) -> TiffResult<IfdPointer>

Turn this value into an IfdPointer.

Notice that this does not take an argument, a 64-bit IFD is always allowed. If the difference is crucial and you do not want to be permissive you’re expected to filter this out before.

For compatibility the smaller sized tags should always be allowed i.e. you might use a non-bigtiff’s directory and its tag types and move it straight to a bigtiff. For instance the SubIFD tag is defined as LONG or IFD:

https://web.archive.org/web/20181105221012/https://www.awaresystems.be/imaging/tiff/tifftags/subifds.html

Source

pub fn into_string(self) -> TiffResult<String>

Source

pub fn into_u32_vec(self) -> TiffResult<Vec<u32>>

Source

pub fn into_u8_vec(self) -> TiffResult<Vec<u8>>

Source

pub fn into_u16_vec(self) -> TiffResult<Vec<u16>>

Source

pub fn into_i32_vec(self) -> TiffResult<Vec<i32>>

Source

pub fn into_f32_vec(self) -> TiffResult<Vec<f32>>

Source

pub fn into_f64_vec(self) -> TiffResult<Vec<f64>>

Source

pub fn into_u64_vec(self) -> TiffResult<Vec<u64>>

Source

pub fn into_i64_vec(self) -> TiffResult<Vec<i64>>

Source

pub fn into_ifd_vec(self) -> TiffResult<Vec<IfdPointer>>

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

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 Value

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Value) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Value

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

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, 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.