Skip to main content

ResponseCode

Enum ResponseCode 

Source
#[repr(u16)]
pub enum ResponseCode {
Show 25 variants Ok = 8_193, GeneralError = 8_194, SessionNotOpen = 8_195, InvalidTransactionId = 8_196, OperationNotSupported = 8_197, ParameterNotSupported = 8_198, IncompleteTransfer = 8_199, InvalidStorageId = 8_200, InvalidObjectHandle = 8_201, DevicePropNotSupported = 8_202, InvalidObjectFormatCode = 8_203, StoreFull = 8_204, ObjectWriteProtected = 8_205, StoreReadOnly = 8_206, AccessDenied = 8_207, NoThumbnailPresent = 8_208, DeviceBusy = 8_217, InvalidParentObject = 8_218, InvalidDevicePropFormat = 8_219, InvalidDevicePropValue = 8_220, InvalidParameter = 8_221, SessionAlreadyOpen = 8_222, TransactionCancelled = 8_223, ObjectTooLarge = 43_017, Unknown(u16),
}
Expand description

PTP response codes (status returned by device).

These codes indicate the result of an operation.

Variants§

§

Ok = 8_193

Operation completed successfully.

§

GeneralError = 8_194

General unspecified error.

§

SessionNotOpen = 8_195

Session is not open.

§

InvalidTransactionId = 8_196

Invalid transaction ID.

§

OperationNotSupported = 8_197

Operation is not supported.

§

ParameterNotSupported = 8_198

Parameter is not supported.

§

IncompleteTransfer = 8_199

Transfer was incomplete.

§

InvalidStorageId = 8_200

Invalid storage ID.

§

InvalidObjectHandle = 8_201

Invalid object handle.

§

DevicePropNotSupported = 8_202

Device property not supported.

§

InvalidObjectFormatCode = 8_203

Invalid object format code.

§

StoreFull = 8_204

Storage is full.

§

ObjectWriteProtected = 8_205

Object is write-protected.

§

StoreReadOnly = 8_206

Storage is read-only.

§

AccessDenied = 8_207

Access denied.

§

NoThumbnailPresent = 8_208

Object has no thumbnail.

§

DeviceBusy = 8_217

Device is busy.

§

InvalidParentObject = 8_218

Invalid parent object.

§

InvalidDevicePropFormat = 8_219

Invalid device property format.

§

InvalidDevicePropValue = 8_220

Invalid device property value.

§

InvalidParameter = 8_221

Invalid parameter value.

§

SessionAlreadyOpen = 8_222

Session is already open.

§

TransactionCancelled = 8_223

Transaction was cancelled.

§

ObjectTooLarge = 43_017

Object is too large for the storage.

§

Unknown(u16)

Unknown or vendor-specific response code.

Trait Implementations§

Source§

impl Clone for ResponseCode

Source§

fn clone(&self) -> ResponseCode

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 ResponseCode

Source§

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

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

impl From<ResponseCode> for u16

Source§

fn from(enum_value: ResponseCode) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for ResponseCode

Source§

fn from(number: u16) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for ResponseCode

Source§

type Primitive = u16

Source§

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

Source§

impl Hash for ResponseCode

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 ResponseCode

Source§

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

Source§

impl Eq for ResponseCode

Source§

impl StructuralPartialEq for ResponseCode

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.