d3xx 0.0.3

Rust bindings for the FTDI D3XX library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Internal utility types and functions.

use std::marker::PhantomData;

/// Used to force a lifetime constraint on a type which does not contain any references.
///
/// This is important for ensuring that lifetimes are correctly enforced by the type
/// system, which otherwise would not catch use-after-free errors in this crate.
pub type PhantomLifetime<'a, T = ()> = PhantomData<&'a T>;

/// Used to force a type to be `!Sync`.
pub type PhantomUnsync = PhantomData<std::cell::Cell<()>>;