pub enum AmendmentText {
Plain(String),
Committed(TextCommitment),
}Expand description
A free-text field of an Amendment: the text
itself in version 1, a commitment to it from version 2
Variants§
Plain(String)
Committed(TextCommitment)
Implementations§
Source§impl AmendmentText
impl AmendmentText
pub fn is_plain(&self) -> bool
Sourcepub fn resolve<'a>(&'a self, beside: Option<&'a CommittedText>) -> &'a str
pub fn resolve<'a>(&'a self, beside: Option<&'a CommittedText>) -> &'a str
What a reader is shown: the text, or WITHHELD_TEXT when it is
not beside the entry — or is, and is not the text committed to
Sourcepub fn status(&self, beside: Option<&CommittedText>) -> Option<TextStatus>
pub fn status(&self, beside: Option<&CommittedText>) -> Option<TextStatus>
None for a version 1 text, which is in the signed data and has
no status to report
Trait Implementations§
Source§impl Clone for AmendmentText
impl Clone for AmendmentText
Source§impl Debug for AmendmentText
impl Debug for AmendmentText
Source§impl<'de> Deserialize<'de> for AmendmentText
impl<'de> Deserialize<'de> for AmendmentText
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 AmendmentText
Source§impl PartialEq for AmendmentText
impl PartialEq for AmendmentText
Source§impl Serialize for AmendmentText
impl Serialize for AmendmentText
impl StructuralPartialEq for AmendmentText
Auto Trait Implementations§
impl Freeze for AmendmentText
impl RefUnwindSafe for AmendmentText
impl Send for AmendmentText
impl Sync for AmendmentText
impl Unpin for AmendmentText
impl UnsafeUnpin for AmendmentText
impl UnwindSafe for AmendmentText
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