pub struct CastVoteRequest {
pub owner_id: Uuid,
pub unit_id: Uuid,
pub vote_choice: VoteChoice,
pub voting_power: Option<Decimal>,
pub proxy_owner_id: Option<Uuid>,
pub auth_method: Option<VoteAuthMethod>,
}Expand description
Request DTO for casting a vote
Fields§
§owner_id: Uuid§unit_id: Uuid§vote_choice: VoteChoice§voting_power: Option<Decimal>Ignoré par le serveur depuis #850.
La puissance de vote d’un lot est sa quotité dans l’acte de base (Art. 3.87 § 2 et § 8 CC) : elle n’est pas déclarative. Le serveur la relit sur le lot et n’accorde aucune valeur à ce champ.
Il reste accepté pour ne pas casser les appelants existants, et sera retiré du contrat quand l’arbitrage de #850 — qui peut saisir un vote, et pour qui — aura tranché le reste de la route.
proxy_owner_id: Option<Uuid>§auth_method: Option<VoteAuthMethod>Story 4.2 (#48) — comment le votant a été authentifié. Obligatoire
(absent → 422 VOTE_AUTH_METHOD_REQUIRED) : Option ici seulement
pour distinguer « absent » (422 typé) d’un JSON malformé (400 générique
de désérialisation). Le cas d’usage cast_vote le valide contre la
modalité de l’AG (assert_vote_auth_sufficient).
Trait Implementations§
Source§impl ComposeSchema for CastVoteRequest
impl ComposeSchema for CastVoteRequest
Source§impl Debug for CastVoteRequest
impl Debug for CastVoteRequest
Source§impl<'de> Deserialize<'de> for CastVoteRequest
impl<'de> Deserialize<'de> for CastVoteRequest
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>,
Auto Trait Implementations§
impl Freeze for CastVoteRequest
impl RefUnwindSafe for CastVoteRequest
impl Send for CastVoteRequest
impl Sync for CastVoteRequest
impl Unpin for CastVoteRequest
impl UnsafeUnpin for CastVoteRequest
impl UnwindSafe for CastVoteRequest
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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