Struct libftd2xx::EepromStrings[][src]

pub struct EepromStrings { /* fields omitted */ }

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]

Create a new EEPROM strings structure.

pub fn with_slices(
    manufacturer: &[i8],
    manufacturer_id: &[i8],
    description: &[i8],
    serial_number: &[i8]
) -> Result<Self, EepromStringsError>
[src]

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]

Set the manufacturer string.

Requirements

  • Less than or equal to 64 characters.
  • The total length of the manufacturer, manufacturer_id, description, and serial_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]

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, and serial_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]

Set the description string.

Requirements

  • Less than or equal to 64 characters.
  • The total length of the manufacturer, manufacturer_id, description, and serial_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]

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, and serial_number strings can not exceed 96 characters.

Trait Implementations

impl Clone for EepromStrings[src]

impl Debug for EepromStrings[src]

impl Default for EepromStrings[src]

impl Eq for EepromStrings[src]

impl PartialEq<EepromStrings> for EepromStrings[src]

impl StructuralEq for EepromStrings[src]

impl StructuralPartialEq for EepromStrings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.