pub struct WorkFormula { /* private fields */ }Expand description
One declared work formula, as the declaration’s own encoded bytes.
Carried as BYTES rather than as a name, because two different formulas an owner happened to name alike would encode identically — and the gate reads work counts against the formula rather than against what it is called.
Implementations§
Source§impl WorkFormula
impl WorkFormula
Sourcepub fn encoded(bytes: Vec<u8>) -> Result<Self, DeclarationError>
pub fn encoded(bytes: Vec<u8>) -> Result<Self, DeclarationError>
One declared work formula, over the declaration’s own encoded bytes.
§Errors
Returns DeclarationError::Absent where no bytes were supplied — an operation that declares no formula states that by carrying none, so an empty one is a formula nobody wrote — and DeclarationError::Unbounded where the bytes outgrow WORK_FORMULA_LIMIT.
Trait Implementations§
Source§impl Clone for WorkFormula
impl Clone for WorkFormula
Source§fn clone(&self) -> WorkFormula
fn clone(&self) -> WorkFormula
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkFormula
impl Debug for WorkFormula
impl Eq for WorkFormula
Source§impl Hash for WorkFormula
impl Hash for WorkFormula
Source§impl PartialEq for WorkFormula
impl PartialEq for WorkFormula
impl StructuralPartialEq for WorkFormula
Auto Trait Implementations§
impl Freeze for WorkFormula
impl RefUnwindSafe for WorkFormula
impl Send for WorkFormula
impl Sync for WorkFormula
impl Unpin for WorkFormula
impl UnsafeUnpin for WorkFormula
impl UnwindSafe for WorkFormula
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