pub struct Gadget {
pub instance: Gadget,
pub outcomes: Sender<Option<BitVector>>,
pub probability_modifiers: Vec<(u64, ProbabilityModifier)>,
pub loss_mask: Option<BitVector>,
pub decoder_seed: Option<u64>,
pub binding_cid: Option<u64>,
pub outputs: Vec<Sender<Option<Connector>>>,
pub pauli_frame: Sender<Option<BitVector>>,
pub correction_count: u64,
pub correction_weight: f64,
pub is_free_hop: bool,
pub state: Sender<GadgetState>,
}Fields§
§instance: Gadget§outcomes: Sender<Option<BitVector>>§probability_modifiers: Vec<(u64, ProbabilityModifier)>§loss_mask: Option<BitVector>§decoder_seed: Option<u64>Seed from this gadget’s loaded Outcomes; meaningful only while outcomes are present.
binding_cid: Option<u64>the check model’s cid that is binding to this gadget
outputs: Vec<Sender<Option<Connector>>>the peer gadgets’ gid connected to each output port
pauli_frame: Sender<Option<BitVector>>the updated pauli frame
correction_count: u64§correction_weight: f64§is_free_hop: boolwhether this gadget has no physical measurements (free-hop gate); free-hop gadgets contribute 0 to hop distance in window exploration. They may still have check models and error models with physical errors that need to be corrected.
state: Sender<GadgetState>Commitment and reservation state. Other decode tasks watch this for release.
Auto Trait Implementations§
impl Forget for Gadget
impl Freeze for Gadget
impl Move for Gadget
impl RefUnwindSafe for Gadget
impl Send for Gadget
impl Sync for Gadget
impl Unpin for Gadget
impl UnsafeUnpin for Gadget
impl UnwindSafe for Gadget
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request