Skip to main content

Resolution

Struct Resolution 

Source
pub struct Resolution {
Show 18 fields pub id: Uuid, pub meeting_id: Uuid, pub title: String, pub description: String, pub resolution_type: ResolutionType, pub majority_required: MajorityType, pub kind: ResolutionKind, pub vote_count_pour: i32, pub vote_count_contre: i32, pub vote_count_abstention: i32, pub total_voting_power_pour: Decimal, pub total_voting_power_contre: Decimal, pub total_voting_power_abstention: Decimal, pub status: ResolutionStatus, pub agenda_item_index: Option<usize>, pub prestataire_de_la_mission: Option<Uuid>, pub created_at: DateTime<Utc>, pub voted_at: Option<DateTime<Utc>>,
}
Expand description

Résolution soumise au vote lors d’une assemblée générale

Fields§

§id: Uuid§meeting_id: Uuid§title: String§description: String§resolution_type: ResolutionType§majority_required: MajorityType§kind: ResolutionKind

Cf. ResolutionKind — Story 4.6 (#581).

§vote_count_pour: i32§vote_count_contre: i32§vote_count_abstention: i32§total_voting_power_pour: Decimal§total_voting_power_contre: Decimal§total_voting_power_abstention: Decimal§status: ResolutionStatus§agenda_item_index: Option<usize>§prestataire_de_la_mission: Option<Uuid>

La personne dont la mission fait l’objet de cette délibération.

Art. 3.87 § 9 : « Aucune personne mandatée ou employée par l’association […] ne peut participer personnellement ou par procuration aux délibérations et aux votes relatifs à la mission qui lui a été confiée. »

La règle est étroite : elle n’écarte pas le prestataire de toute l’assemblée, seulement des points qui le concernent. Un entrepreneur copropriétaire vote sur le budget ; il ne vote pas sur l’attribution du marché qu’il brigue.

None est le cas courant — la plupart des résolutions ne portent la mission de personne.

§created_at: DateTime<Utc>§voted_at: Option<DateTime<Utc>>

Implementations§

Source§

impl Resolution

Source

pub fn new( meeting_id: Uuid, title: String, description: String, resolution_type: ResolutionType, majority_required: MajorityType, agenda_item_index: Option<usize>, ) -> Result<Self, String>

Crée une nouvelle résolution Issue #310: Optional agenda_item_index for Art. 3.87 CC compliance (Belgian law)

Source

pub fn new_avec_prestataire( meeting_id: Uuid, title: String, description: String, resolution_type: ResolutionType, majority_required: MajorityType, agenda_item_index: Option<usize>, prestataire_de_la_mission: Option<Uuid>, ) -> Result<Self, String>

La même résolution, en désignant la personne dont elle traite la mission (Art. 3.87 § 9).

Source

pub fn new_evaluation_contractors_auto(meeting_id: Uuid) -> Self

La résolution d’évaluation des prestataires que generate_ago_resolutions ajoute d’office à toute AGO (Art. 3.89 § 5, 12° Code Civil belge — Story 4.6, #581).

Construite directement plutôt que via new_avec_prestataire : son titre et sa description sont fixes et jamais vides, donc jamais faillibles — un Result ici n’aurait pas d’état d’erreur atteignable, et forcerait l’appelant à unwrap() un cas qui ne se produit pas.

Source

pub fn is_auto_generated(&self) -> bool

Une résolution générée d’office (Story 4.6) n’est ni supprimable ni modifiable par l’organe qu’elle évalue — c’est le cœur de la story : le syndic ne retire pas son propre bulletin de notes de l’ordre du jour. Dérivé de kind, jamais stocké séparément, pour qu’aucune écriture (changement de statut, de titre…) ne puisse désynchroniser la protection de ce qu’elle protège.

Source

pub fn record_vote_pour(&mut self, voting_power: Decimal)

Enregistre un vote “Pour” et met à jour les compteurs

Source

pub fn record_vote_contre(&mut self, voting_power: Decimal)

Enregistre un vote “Contre” et met à jour les compteurs

Source

pub fn record_abstention(&mut self, voting_power: Decimal)

Enregistre une abstention et met à jour les compteurs

Source

pub fn recompter_avec(&mut self, votes: &[Vote], poids_retenus: &[Decimal])

Refait le décompte pondéré à partir des bulletins et de leur poids retenu, après application du plafond de l’Art. 3.87 § 7 al. 4.

Les compteurs accumulés au fil des votes reflètent les voix brutes. Quand un votant est plafonné, ils ne valent plus rien pour établir la majorité : il faut repartir des bulletins. Le nombre de votants, lui, ne change pas — c’est le poids qui est réduit, pas le droit de voter.

poids_retenus suit l’ordre de votes, tel que le rend repartir_le_plafond.

Source

pub fn calculate_result(&self, total_voting_power: Decimal) -> ResolutionStatus

Calcule le résultat du vote en fonction du type de majorité — Art. 3.88 §1 Code Civil belge

Source

pub fn close_voting( &mut self, total_voting_power: Decimal, ) -> Result<(), String>

Clôture le vote et finalise le statut

Source

pub fn total_votes(&self) -> i32

Retourne le nombre total de votes exprimés

Source

pub fn voix_exprimees(&self) -> Decimal

Le total des voix exprimées, abstentions exclues.

Art. 3.87 § 8 : « Les abstentions, les votes nuls et blancs ne sont pas considérés comme des voix émises pour le calcul de la majorité requise. » C’est donc ce total, et non celui de tous les présents, qui sert de dénominateur à la majorité.

Source

pub fn pour_percentage(&self) -> f64

La part des voix « pour », en pourcentage des voix exprimées.

Art. 3.87 § 6 : « Chaque copropriétaire dispose d’un nombre de voix correspondant à sa quote-part dans les parties communes. » Le droit belge compte donc des voix, jamais des têtes.

Ce pourcentage comptait auparavant les bulletins : trois votants dont un majoritaire donnaient « 33 % pour » alors qu’il pesait 55 % des tantièmes. Un syndic lisant cet écran voyait l’inverse du droit. Constaté en recette le 2026-09-04.

Le dénominateur est celui de la majorité, pour que le pourcentage affiché et le résultat proclamé se répondent.

Source

pub fn contre_percentage(&self) -> f64

La part des voix « contre », sur la même base que pour_percentage.

Source

pub fn abstention_percentage(&self) -> f64

La part des abstentions, rapportée à toutes les voix présentes.

Dénominateur différent de celui des deux précédents, à dessein : une abstention ne participe pas à la majorité (Art. 3.87 § 8), donc la rapporter aux seules voix exprimées n’aurait aucun sens — elle en est exclue par définition. Ce qu’un syndic veut savoir, c’est quelle part de l’assemblée s’est abstenue.

Trait Implementations§

Source§

impl Clone for Resolution

Source§

fn clone(&self) -> Resolution

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 ComposeSchema for Resolution

Source§

fn compose(generics: Vec<RefOr<Schema>>) -> RefOr<Schema>

Source§

impl Debug for Resolution

Source§

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

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

impl<'de> Deserialize<'de> for Resolution

Source§

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<Resolution> for ResolutionResponse

Source§

fn from(resolution: Resolution) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Resolution

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Resolution

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Resolution

Source§

impl ToSchema for Resolution

Source§

fn name() -> Cow<'static, str>

Return name of the schema. Read more
Source§

fn schemas(schemas: &mut Vec<(String, RefOr<Schema>)>)

Implement reference [utoipa::openapi::schema::Schema]s for this type. Read more

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Fake for T

§

fn fake<U>(&self) -> U
where Self: FakeBase<U>,

§

fn fake_with_rng<U, R>(&self, rng: &mut R) -> U
where R: RngExt + ?Sized, Self: FakeBase<U>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> PartialSchema for T
where T: ComposeSchema + ?Sized,

§

fn schema() -> RefOr<Schema>

Return ref or schema of implementing type that can then be used to construct combined schemas.
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more