pub struct Verdict {
pub status: String,
pub height: Option<Height>,
pub reason: Option<String>,
pub competitors: Vec<TxId>,
}Expand description
Raw broadcaster metadata. HTTP acceptance is not chain evidence.
Fields§
§status: StringThe raw txStatus word, as the body spelled it.
height: Option<Height>The raw blockHeight, when present.
reason: Option<String>The raw extraInfo, when present.
competitors: Vec<TxId>The competingTxs, lowercased and checked for shape and uniqueness.
Implementations§
Source§impl Verdict
impl Verdict
Sourcepub fn from_arc_body(
expected_txid: &str,
bytes: &[u8],
) -> Result<Self, VerdictError>
pub fn from_arc_body( expected_txid: &str, bytes: &[u8], ) -> Result<Self, VerdictError>
Read an ARC body as metadata, checking its echoed txid and the bounded status vocabulary at bsv-rs@7bc623c. HTTP status is never consulted.
§Errors
VerdictError::Shape when the body does not decode,
VerdictError::TxidMismatch when it echoes another or a malformed
txid, VerdictError::InvalidMetadata when its text or competitors
break the bounds, and VerdictError::UnknownStatus for a status word
outside the vocabulary.
Trait Implementations§
impl Eq for Verdict
impl StructuralPartialEq for Verdict
Auto Trait Implementations§
impl Freeze for Verdict
impl RefUnwindSafe for Verdict
impl Send for Verdict
impl Sync for Verdict
impl Unpin for Verdict
impl UnsafeUnpin for Verdict
impl UnwindSafe for Verdict
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