pub struct ForceOldImage { /* private fields */ }
Expand description
Represents the configuration for forcing the use of an old image.
This struct is used to store and manipulate the settings for whether an old image (e.g., firmware or partition) should be used, and how it should be configured. The configuration consists of three components:
pin
: A pin number (0-31) used in the configuration.port
: A port number (0 or 1), which determines whether the configuration uses a specific port.active
: A boolean flag indicating whether the old image configuration is active or not.
Implementations§
Source§impl ForceOldImage
impl ForceOldImage
Sourcepub fn new(pin: u8, port: u8, active: bool) -> Self
pub fn new(pin: u8, port: u8, active: bool) -> Self
Creates a new instance of ForceOldImage
with the specified pin, port, and active status.
§Returns:
- A new
ForceOldImage
struct.
Sourcepub fn pin(&self) -> u8
pub fn pin(&self) -> u8
Retrieves the pin number of the configuration.
§Returns:
- The pin number (0-31) used in the configuration.
Trait Implementations§
Source§impl Clone for ForceOldImage
impl Clone for ForceOldImage
Source§fn clone(&self) -> ForceOldImage
fn clone(&self) -> ForceOldImage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ForceOldImage
impl Debug for ForceOldImage
Source§impl Default for ForceOldImage
impl Default for ForceOldImage
Source§impl<'de> Deserialize<'de> for ForceOldImage
impl<'de> Deserialize<'de> for ForceOldImage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<u32> for ForceOldImage
impl From<u32> for ForceOldImage
Source§impl Into<u32> for ForceOldImage
impl Into<u32> for ForceOldImage
Source§impl Serialize for ForceOldImage
impl Serialize for ForceOldImage
impl Copy for ForceOldImage
Auto Trait Implementations§
impl Freeze for ForceOldImage
impl RefUnwindSafe for ForceOldImage
impl Send for ForceOldImage
impl Sync for ForceOldImage
impl Unpin for ForceOldImage
impl UnwindSafe for ForceOldImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more