pub struct Config {
pub vendor_id: [u8; 8],
pub product_id: [u8; 16],
pub product_revision_level: [u8; 4],
pub serial_number: [u8; 32],
pub serial_number_len: u8,
pub out_endpoint_options: EndpointOptions,
pub in_endpoint_options: EndpointOptions,
}Expand description
Configuration for the USB Mass Storage Class.
Fields§
§vendor_id: [u8; 8]Vendor identification (8 ASCII characters, space-padded per SPC-2).
product_id: [u8; 16]Product identification (16 ASCII characters, space-padded per SPC-2).
product_revision_level: [u8; 4]Product revision level (4 ASCII characters, space-padded per SPC-2).
serial_number: [u8; 32]Unit serial number (up to 32 ASCII characters).
serial_number_len: u8Length of the unit serial number in bytes (0..=32).
out_endpoint_options: EndpointOptionsOptions for the bulk OUT endpoint, which receives the data the host sends.
in_endpoint_options: EndpointOptionsOptions for the bulk IN endpoint, which sends data to the host.
Implementations§
Source§impl Config
impl Config
Sourcepub fn vendor_id(self, vendor_id: &str) -> Self
pub fn vendor_id(self, vendor_id: &str) -> Self
Sets the SCSI Vendor Identification (space-padded or truncated to 8 bytes).
Sourcepub fn set_vendor_id(&mut self, vendor_id: &str)
pub fn set_vendor_id(&mut self, vendor_id: &str)
Sets the SCSI Vendor Identification (space-padded or truncated to 8 bytes).
Sourcepub fn product_id(self, product_id: &str) -> Self
pub fn product_id(self, product_id: &str) -> Self
Sets the SCSI Product Identification (space-padded or truncated to 16 bytes).
Sourcepub fn set_product_id(&mut self, product_id: &str)
pub fn set_product_id(&mut self, product_id: &str)
Sets the SCSI Product Identification (space-padded or truncated to 16 bytes).
Sourcepub fn product_revision_level(self, revision: &str) -> Self
pub fn product_revision_level(self, revision: &str) -> Self
Sets the SCSI Product Revision Level (space-padded or truncated to 4 bytes).
Sourcepub fn set_product_revision_level(&mut self, revision: &str)
pub fn set_product_revision_level(&mut self, revision: &str)
Sets the SCSI Product Revision Level (space-padded or truncated to 4 bytes).
Sourcepub fn serial_number(self, serial_number: &str) -> Self
pub fn serial_number(self, serial_number: &str) -> Self
Sets the Unit Serial Number (up to 32 ASCII characters).
Sourcepub fn set_serial_number(&mut self, serial_number: &str)
pub fn set_serial_number(&mut self, serial_number: &str)
Sets the Unit Serial Number (up to 32 ASCII characters).
Sourcepub fn serial_number_bytes(&self) -> &[u8]
pub fn serial_number_bytes(&self) -> &[u8]
Returns the unit serial number bytes.