Skip to main content

ConvocationRecipient

Struct ConvocationRecipient 

Source
pub struct ConvocationRecipient {
Show 15 fields pub id: Uuid, pub convocation_id: Uuid, pub owner_id: Uuid, pub email: String, pub email_sent_at: Option<DateTime<Utc>>, pub email_opened_at: Option<DateTime<Utc>>, pub email_failed: bool, pub email_failure_reason: Option<String>, pub reminder_sent_at: Option<DateTime<Utc>>, pub reminder_opened_at: Option<DateTime<Utc>>, pub attendance_status: AttendanceStatus, pub attendance_updated_at: Option<DateTime<Utc>>, pub proxy_owner_id: Option<Uuid>, pub created_at: DateTime<Utc>, pub updated_at: DateTime<Utc>,
}
Expand description

Individual recipient of a convocation

Tracks delivery, opening, and attendance for each owner

Fields§

§id: Uuid§convocation_id: Uuid§owner_id: Uuid§email: String§email_sent_at: Option<DateTime<Utc>>§email_opened_at: Option<DateTime<Utc>>§email_failed: bool§email_failure_reason: Option<String>§reminder_sent_at: Option<DateTime<Utc>>§reminder_opened_at: Option<DateTime<Utc>>§attendance_status: AttendanceStatus§attendance_updated_at: Option<DateTime<Utc>>§proxy_owner_id: Option<Uuid>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>

Implementations§

Source§

impl ConvocationRecipient

Source

pub fn new( convocation_id: Uuid, owner_id: Uuid, email: String, ) -> Result<Self, String>

Create a new convocation recipient

Source

pub fn mark_email_sent(&mut self)

Mark email as sent

Source

pub fn mark_email_failed(&mut self, reason: String)

Mark email as failed

Source

pub fn mark_email_opened(&mut self) -> Result<(), String>

Mark email as opened (read receipt)

Source

pub fn mark_reminder_sent(&mut self) -> Result<(), String>

Mark reminder as sent

Source

pub fn mark_reminder_opened(&mut self) -> Result<(), String>

Mark reminder as opened

Source

pub fn update_attendance_status( &mut self, status: AttendanceStatus, ) -> Result<(), String>

Update attendance status

Source

pub fn set_proxy( &mut self, proxy_owner_id: Uuid, qualite: QualiteDuMandataire, ) -> Result<(), String>

Enregistre une procuration.

§Art. 3.87 § 7, dernier alinéa

« Le syndic ne peut intervenir comme mandataire d’un copropriétaire à l’assemblée générale, nonobstant le droit pour lui, s’il est copropriétaire, de participer à ce titre aux délibérations. »

La règle porte sur le mandat, pas sur le vote qui en découle : le texte interdit d’« intervenir comme mandataire ». On refuse donc ici, à l’enregistrement.

C’est ce qui la distingue des deux autres règles du § 7 — le plafond de trois procurations et celui des voix. Celles-là ne peuvent pas se vérifier au moment du mandat : on ignore encore combien de procurations le mandataire recevra et quel poids elles pèseront. Elles restent donc dans procurations.rs, sur l’ensemble des voix d’une séance.

L’enjeu est pratique. Une assemblée tenue sur un mandat prohibé est attaquable, et ce sont ses décisions — travaux, budgets, mandats — qui tombent avec elle. Refuser à l’enregistrement évite la séance entière ; refuser au dépouillement ne fait que constater les dégâts.

La seconde partie de l’alinéa est respectée : rien n’empêche le syndic copropriétaire d’être destinataire et de voter pour lui-même. Ce qu’on refuse, c’est qu’il soit le mandataire d’un autre.

Source

pub fn remove_proxy(&mut self)

Remove proxy delegation

Source

pub fn has_opened_email(&self) -> bool

Check if email was opened

Source

pub fn has_opened_reminder(&self) -> bool

Check if reminder was opened

Source

pub fn needs_reminder(&self) -> bool

Check if recipient needs reminder (email sent but not opened, no reminder sent yet)

Source

pub fn has_confirmed_attendance(&self) -> bool

Check if owner has confirmed attendance (either will attend or will not attend)

Source

pub fn days_since_email_sent(&self) -> Option<i64>

Get days since email sent (if sent)

Trait Implementations§

Source§

impl Clone for ConvocationRecipient

Source§

fn clone(&self) -> ConvocationRecipient

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 Debug for ConvocationRecipient

Source§

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

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

impl<'de> Deserialize<'de> for ConvocationRecipient

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<ConvocationRecipient> for ConvocationRecipientResponse

Source§

fn from(recipient: ConvocationRecipient) -> Self

Converts to this type from the input type.
Source§

impl From<ConvocationRecipient> for RecipientSummaryResponse

Source§

fn from(recipient: ConvocationRecipient) -> Self

Converts to this type from the input type.
Source§

impl Serialize for ConvocationRecipient

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

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