Skip to main content

DevicePropertyCode

Enum DevicePropertyCode 

Source
#[repr(u16)]
pub enum DevicePropertyCode {
Show 33 variants Undefined = 20_480, BatteryLevel = 20_481, FunctionalMode = 20_482, ImageSize = 20_483, CompressionSetting = 20_484, WhiteBalance = 20_485, RgbGain = 20_486, FNumber = 20_487, FocalLength = 20_488, FocusDistance = 20_489, FocusMode = 20_490, ExposureMeteringMode = 20_491, FlashMode = 20_492, ExposureTime = 20_493, ExposureProgramMode = 20_494, ExposureIndex = 20_495, ExposureBiasCompensation = 20_496, DateTime = 20_497, CaptureDelay = 20_498, StillCaptureMode = 20_499, Contrast = 20_500, Sharpness = 20_501, DigitalZoom = 20_502, EffectMode = 20_503, BurstNumber = 20_504, BurstInterval = 20_505, TimelapseNumber = 20_506, TimelapseInterval = 20_507, FocusMeteringMode = 20_508, UploadUrl = 20_509, Artist = 20_510, CopyrightInfo = 20_511, Unknown(u16),
}
Expand description

Standard PTP device property codes (0x5000 range).

These codes identify device-level properties that can be read or modified using the GetDevicePropDesc, GetDevicePropValue, SetDevicePropValue, and ResetDevicePropValue operations.

Device properties are primarily used with digital cameras for settings like ISO, aperture, shutter speed, etc. Most Android MTP devices do not support device properties.

Variants§

§

Undefined = 20_480

Undefined property.

§

BatteryLevel = 20_481

Battery level (UINT8, 0-100 percent).

§

FunctionalMode = 20_482

Device functional mode (UINT16).

§

ImageSize = 20_483

Image size setting (String, e.g., “1920x1080”).

§

CompressionSetting = 20_484

Compression setting (UINT8).

§

WhiteBalance = 20_485

White balance (UINT16).

§

RgbGain = 20_486

RGB gain (String).

§

FNumber = 20_487

F-Number/Aperture (UINT16, value/100 = f-stop).

§

FocalLength = 20_488

Focal length (UINT32, units of 0.01mm).

§

FocusDistance = 20_489

Focus distance (UINT16, mm).

§

FocusMode = 20_490

Focus mode (UINT16).

§

ExposureMeteringMode = 20_491

Exposure metering mode (UINT16).

§

FlashMode = 20_492

Flash mode (UINT16).

§

ExposureTime = 20_493

Exposure time/shutter speed (UINT32, units of 0.0001s).

§

ExposureProgramMode = 20_494

Exposure program mode (UINT16).

§

ExposureIndex = 20_495

Exposure index/ISO (UINT16).

§

ExposureBiasCompensation = 20_496

Exposure bias compensation (INT16, units of 0.001 EV).

§

DateTime = 20_497

Date and time (String, “YYYYMMDDThhmmss”).

§

CaptureDelay = 20_498

Capture delay (UINT32, ms).

§

StillCaptureMode = 20_499

Still capture mode (UINT16).

§

Contrast = 20_500

Contrast (UINT8).

§

Sharpness = 20_501

Sharpness (UINT8).

§

DigitalZoom = 20_502

Digital zoom (UINT8).

§

EffectMode = 20_503

Effect mode (UINT16).

§

BurstNumber = 20_504

Burst number (UINT16).

§

BurstInterval = 20_505

Burst interval (UINT16, ms).

§

TimelapseNumber = 20_506

Timelapse number (UINT16).

§

TimelapseInterval = 20_507

Timelapse interval (UINT32, ms).

§

FocusMeteringMode = 20_508

Focus metering mode (UINT16).

§

UploadUrl = 20_509

Upload URL (String).

§

Artist = 20_510

Artist name (String).

§

CopyrightInfo = 20_511

Copyright info (String).

§

Unknown(u16)

Unknown/vendor-specific property code.

Trait Implementations§

Source§

impl Clone for DevicePropertyCode

Source§

fn clone(&self) -> DevicePropertyCode

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 DevicePropertyCode

Source§

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

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

impl From<DevicePropertyCode> for u16

Source§

fn from(enum_value: DevicePropertyCode) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for DevicePropertyCode

Source§

fn from(number: u16) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for DevicePropertyCode

Source§

type Primitive = u16

Source§

fn from_primitive(number: Self::Primitive) -> Self

Source§

impl Hash for DevicePropertyCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DevicePropertyCode

Source§

fn eq(&self, other: &DevicePropertyCode) -> 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 Copy for DevicePropertyCode

Source§

impl Eq for DevicePropertyCode

Source§

impl StructuralPartialEq for DevicePropertyCode

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