indigo_device

Struct indigo_device 

Source
#[repr(C)]
pub struct indigo_device {
Show 17 fields pub name: [c_char; 128], pub lock: indigo_glock, pub is_remote: bool, pub gp_bits: u16, pub device_context: *mut c_void, pub private_data: *mut c_void, pub master_device: *mut indigo_device, pub last_result: indigo_result, pub version: indigo_version, pub access_token: indigo_token, pub match_patterns: *mut c_void, pub match_patterns_count: c_int, pub attach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>, pub enumerate_properties: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>, pub change_property: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>, pub enable_blob: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property, mode: indigo_enable_blob_mode) -> indigo_result>, pub detach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>,
}
Expand description

Device structure definition

Fields§

§name: [c_char; 128]

< device name

§lock: indigo_glock

< device global lock

§is_remote: bool

< is remote device

§gp_bits: u16

< general purpose bits for driver specific usage

§device_context: *mut c_void

< any device specific data

§private_data: *mut c_void

< private data

§master_device: *mut indigo_device

< if the device provides many logical devices, this must point to one of the locical devices, otherwise is safe to be NULL

§last_result: indigo_result

< result of last bus operation

§version: indigo_version

< device version

§access_token: indigo_token

< allow change request with correct access token only

§match_patterns: *mut c_void

< device matching patterns

§match_patterns_count: c_int

< device matching patterns count

§attach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>

callback called when device is attached to bus

§enumerate_properties: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>

callback called when client broadcast enumerate properties request on bus, device and name elements of property can be set NULL to address all

§change_property: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property) -> indigo_result>

callback called when client broadcast property change request

§enable_blob: Option<unsafe extern "C" fn(device: *mut indigo_device, client: *mut indigo_client, property: *mut indigo_property, mode: indigo_enable_blob_mode) -> indigo_result>

callback called when client broadcast enableBLOB mode change request

§detach: Option<unsafe extern "C" fn(device: *mut indigo_device) -> indigo_result>

callback called when device is detached from the bus

Trait Implementations§

Source§

impl Debug for indigo_device

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