Skip to main content

RepairabilityIndexScope

Enum RepairabilityIndexScope 

Source
#[non_exhaustive]
pub enum RepairabilityIndexScope { Covered, NotCovered, ExcludedRollableDisplay, ExcludedHighSecurity, }
Expand description

Whether Reg. (EU) 2023/1669’s repairability index reaches a product.

Three outcomes rather than a bool. “This device type is outside the act” and “this unit is carved out of it” are different sentences to put in front of an operator, and they have different remedies — the first is never fixable, the second is a declaration the operator made. Same reasoning as PassportScope.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Covered

Art. 1 names this device type and no exclusion is declared.

§

NotCovered

Art. 1 does not name this device type — a cordless phone, or a mobile phone that is not a smartphone. In scope of 2023/1670, not of this act.

§

ExcludedRollableDisplay

Art. 1(a) — a flexible main display the user can unroll and roll up.

§

ExcludedHighSecurity

Art. 1(b) — a smartphone for high security communication.

Implementations§

Source§

impl RepairabilityIndexScope

Source

pub fn is_covered(self) -> bool

Whether an index is owed on the strength of this answer alone.

true only for Covered. A caller that needs to tell why not apart must match the variant, which is why this is not an Option<bool>.

Source

pub fn is_declared_exclusion(self) -> bool

Whether the answer rests on an exclusion the operator declared.

Exists so a caller can distinguish “the act never reached this” from “the act reaches this type and the operator says this unit is carved out” — the second is a claim that can be wrong, and the first cannot.

Trait Implementations§

Source§

impl Clone for RepairabilityIndexScope

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RepairabilityIndexScope

Source§

impl Debug for RepairabilityIndexScope

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RepairabilityIndexScope

Source§

impl PartialEq for RepairabilityIndexScope

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RepairabilityIndexScope

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.