pub struct GuardianshipVote {
pub id: String,
pub proposal_id: String,
pub guardian_did: String,
pub approve: bool,
pub reason: Option<String>,
pub voted_unix: u32,
pub voted_instant: Option<InstantBridge>,
}Expand description
A guardian’s immutable co-signature (approve) or objection (deny) on a proposal.
Fields§
§id: String§proposal_id: String§guardian_did: String§approve: bool§reason: Option<String>§voted_unix: u32§voted_instant: Option<InstantBridge>High-resolution instant (T71 bridge). Preferred over voted_unix
when present; the u32 field is kept for backward-compatible deserialization.
Implementations§
Source§impl GuardianshipVote
impl GuardianshipVote
Sourcepub fn new(
proposal_id: impl Into<String>,
guardian_did: impl Into<String>,
approve: bool,
reason: Option<String>,
voted_unix: u32,
) -> Self
pub fn new( proposal_id: impl Into<String>, guardian_did: impl Into<String>, approve: bool, reason: Option<String>, voted_unix: u32, ) -> Self
Creates a new instance.
Sourcepub fn voted_at(&self) -> InstantBridge
pub fn voted_at(&self) -> InstantBridge
Resolve the voted instant, preferring the high-resolution
InstantBridge field when present (T71 bridge).
Trait Implementations§
Source§impl Clone for GuardianshipVote
impl Clone for GuardianshipVote
Source§impl Debug for GuardianshipVote
impl Debug for GuardianshipVote
Source§impl<'de> Deserialize<'de> for GuardianshipVote
impl<'de> Deserialize<'de> for GuardianshipVote
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GuardianshipVote
Source§impl PartialEq for GuardianshipVote
impl PartialEq for GuardianshipVote
Source§impl Serialize for GuardianshipVote
impl Serialize for GuardianshipVote
impl StructuralPartialEq for GuardianshipVote
Auto Trait Implementations§
impl Freeze for GuardianshipVote
impl RefUnwindSafe for GuardianshipVote
impl Send for GuardianshipVote
impl Sync for GuardianshipVote
impl Unpin for GuardianshipVote
impl UnsafeUnpin for GuardianshipVote
impl UnwindSafe for GuardianshipVote
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
Mutably borrows from an owned value. Read more