pub struct InvariantLegal {
pub article: &'static str,
pub obligation: &'static str,
pub porte_par: &'static str,
pub atteste_par: Option<&'static str>,
pub non_couverte: Option<&'static str>,
pub delai_jours: Option<i64>,
}Expand description
Un invariant légal porté par le domaine.
Fields§
§article: &'static strL’article qui le fonde, tel qu’on le cite dans un courrier.
obligation: &'static strCe que la loi exige, en une phrase lisible par un juriste.
porte_par: &'static strLe fichier du domaine qui le porte, relatif à src/.
atteste_par: Option<&'static str>Un test qui ATTESTE l’obligation — pas seulement qui existe.
None quand aucun test du dépôt ne vérifie réellement l’énoncé de
l’obligation (#847) : dans ce cas, non_couverte dit pourquoi.
Some et non_couverte: Some(_) en même temps sont contradictoires,
et chaque_invariant_designe_un_test_qui_existe puis le contrôle
dédié le refusent.
non_couverte: Option<&'static str>Pourquoi l’obligation n’est PAS couverte, quand atteste_par est
None.
Ce n’est pas une case de confort : une obligation ne peut pas rester silencieuse sur son absence de preuve. Le message doit dire ce que le test le plus proche vérifie réellement (pour qu’on comprenne l’écart) et, si le correctif est déjà suivi ailleurs, par quelle issue.
delai_jours: Option<i64>Le délai que l’article impose, en jours, quand il en impose un.
── Pourquoi il vit ICI et pas dans l’interface ────────────────────
La remise de design veut afficher un décompte d’échéance à côté de chaque tâche : « 18 j sur 30 », avec la référence de l’article. Elle met en garde dans le même souffle :
Legal references are placeholders. The stated day counts (15 / 30) must be sourced from the project’s own registry, not hardcoded in components.
Un « 30 » écrit dans un composant Svelte est un nombre que rien ne relie à la loi. Le jour où le législateur le change — ou, plus probable, le jour où l’on découvre qu’on l’avait mal lu — le domaine est corrigé et l’écran continue d’annoncer l’ancien délai au syndic. Il agirait alors sur une échéance fausse en croyant lire le produit.
garde_delais_du_registre vérifie que chaque valeur ici correspond à
la constante du module qui la porte.
None quand l’article n’impose aucun délai : la plupart des
obligations sont des règles de fond, pas des échéances.
Trait Implementations§
Source§impl Clone for InvariantLegal
impl Clone for InvariantLegal
Source§fn clone(&self) -> InvariantLegal
fn clone(&self) -> InvariantLegal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InvariantLegal
Source§impl Debug for InvariantLegal
impl Debug for InvariantLegal
impl Eq for InvariantLegal
Source§impl PartialEq for InvariantLegal
impl PartialEq for InvariantLegal
Source§fn eq(&self, other: &InvariantLegal) -> bool
fn eq(&self, other: &InvariantLegal) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InvariantLegal
Auto Trait Implementations§
impl Freeze for InvariantLegal
impl RefUnwindSafe for InvariantLegal
impl Send for InvariantLegal
impl Sync for InvariantLegal
impl Unpin for InvariantLegal
impl UnsafeUnpin for InvariantLegal
impl UnwindSafe for InvariantLegal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more