pub struct CheckModel {
pub ctype: u64,
pub gid: u64,
pub tag: String,
pub modifier: Option<CheckModelModifier>,
pub cid: u64,
pub terminal_error_model: Option<ErrorModel>,
pub error_model_count: Option<u64>,
}Fields§
§ctype: u64the check model type to instantiate
gid: u64the gadget it attaches to
tag: String§modifier: Option<CheckModelModifier>§cid: u64only for visualization: this has no effect on the runtime system; runtime system will generate cid to serve its own need. leave this field zero to auto assign cid from 1
terminal_error_model: Option<ErrorModel>Optional early model registered once per JIT gadget type. Its instance uses the same eid and error indices as the eventual full model. This is not an attached model. Probabilities and correction effects are unchanged. Each error’s unfinished checks are replaced by one remote check at the reserved absolute cid UINT64_MAX - 2, which is always outside the window. Window decoding drops a committing error with any external check, while buffer errors project away external vertices. Original indices are kept in the type for probability modifiers; no probabilities are zeroed. Window decoding may select it when no full model is attached and no output path reaches another gadget in the window, including boundary buffers. Interior and reconvergent paths require the full model. Early commitment need not match a full model whose future checks later disappear or cancel. Monolithic decoding ignores this fallback.
error_model_count: Option<u64>Number of full ErrorModel instances required before decoding; defaults to one. Set zero for an intentionally error-free model, or declare the full count when attaching multiple models. Terminal fallback requires count one.
Implementations§
Source§impl CheckModel
impl CheckModel
Sourcepub fn error_model_count(&self) -> u64
pub fn error_model_count(&self) -> u64
Returns the value of error_model_count, or the default value if error_model_count is unset.
Trait Implementations§
Source§impl Clone for CheckModel
impl Clone for CheckModel
Source§impl Debug for CheckModel
impl Debug for CheckModel
Source§impl Default for CheckModel
impl Default for CheckModel
Source§impl Message for CheckModel
impl Message for CheckModel
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for CheckModel
impl PartialEq for CheckModel
impl StructuralPartialEq for CheckModel
Auto Trait Implementations§
impl Forget for CheckModel
impl Freeze for CheckModel
impl Move for CheckModel
impl RefUnwindSafe for CheckModel
impl Send for CheckModel
impl Sync for CheckModel
impl Unpin for CheckModel
impl UnsafeUnpin for CheckModel
impl UnwindSafe for CheckModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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>
T in a tonic::Request