[−][src]Struct libftd2xx::EepromStrings
EEPROM strings structure.
This structure contains the strings programmed into EEPROM that are common across all FTDI devices.
This is used by the eeprom_read
and eeprom_program
methods.
Implementations
impl EepromStrings
[src]
pub fn with_strs(
manufacturer: &str,
manufacturer_id: &str,
description: &str,
serial_number: &str
) -> Result<Self, EepromStringsError>
[src]
manufacturer: &str,
manufacturer_id: &str,
description: &str,
serial_number: &str
) -> Result<Self, EepromStringsError>
Create a new EEPROM strings structure.
pub fn with_slices(
manufacturer: &[i8],
manufacturer_id: &[i8],
description: &[i8],
serial_number: &[i8]
) -> Result<Self, EepromStringsError>
[src]
manufacturer: &[i8],
manufacturer_id: &[i8],
description: &[i8],
serial_number: &[i8]
) -> Result<Self, EepromStringsError>
Create a new EEPROM strings structure from raw slices.
pub fn string_len(&self) -> usize
[src]
Total length of the manufacturer
, manufacturer_id
,
description
, and serial_number
strings.
Together these strings cannot exceed 96 characters.
pub fn manufacturer(&self) -> String
[src]
Manufacturer string.
pub fn set_manufacturer(
&mut self,
value: String
) -> Result<(), EepromStringsError>
[src]
&mut self,
value: String
) -> Result<(), EepromStringsError>
Set the manufacturer string.
Requirements
- Less than or equal to 64 characters.
- The total length of the
manufacturer
,manufacturer_id
,description
, andserial_number
strings can not exceed 96 characters.
pub fn manufacturer_id(&self) -> String
[src]
Manufacturer ID string.
pub fn set_manufacturer_id(
&mut self,
value: String
) -> Result<(), EepromStringsError>
[src]
&mut self,
value: String
) -> Result<(), EepromStringsError>
Set the manufacturer ID string.
The first two characters of this string should be the same as the first two characters of the device serial number. For example, if your manufacturer ID is "FTDI" your serial number should start with "FT".
Requirements
- Less than or equal to 64 characters.
- The total length of the
manufacturer
,manufacturer_id
,description
, andserial_number
strings can not exceed 96 characters.
pub fn description(&self) -> String
[src]
Description string.
pub fn set_description(
&mut self,
value: String
) -> Result<(), EepromStringsError>
[src]
&mut self,
value: String
) -> Result<(), EepromStringsError>
Set the description string.
Requirements
- Less than or equal to 64 characters.
- The total length of the
manufacturer
,manufacturer_id
,description
, andserial_number
strings can not exceed 96 characters.
pub fn serial_number(&self) -> String
[src]
Serial number string.
pub fn set_serial_number(
&mut self,
value: String
) -> Result<(), EepromStringsError>
[src]
&mut self,
value: String
) -> Result<(), EepromStringsError>
Set the manufacturer ID string.
The first two characters of this string should be the same as the first two characters of the device serial number. For example, if your manufacturer ID is "FTDI" your serial number should start with "FT".
Requirements
- Less than or equal to 64 characters.
- The total length of the
manufacturer
,manufacturer_id
,description
, andserial_number
strings can not exceed 96 characters.
Trait Implementations
impl Clone for EepromStrings
[src]
fn clone(&self) -> EepromStrings
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for EepromStrings
[src]
impl Default for EepromStrings
[src]
fn default() -> EepromStrings
[src]
impl Eq for EepromStrings
[src]
impl PartialEq<EepromStrings> for EepromStrings
[src]
fn eq(&self, other: &EepromStrings) -> bool
[src]
fn ne(&self, other: &EepromStrings) -> bool
[src]
impl StructuralEq for EepromStrings
[src]
impl StructuralPartialEq for EepromStrings
[src]
Auto Trait Implementations
impl RefUnwindSafe for EepromStrings
impl Send for EepromStrings
impl Sync for EepromStrings
impl Unpin for EepromStrings
impl UnwindSafe for EepromStrings
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,