pub struct Atom8 {
pub pred_id: PredicateId,
pub arity: u8,
pub binding_mask: u8,
pub args: [TermId; 8],
}Expand description
Atom8 — a predicate application with up to 8 arguments. ARD section 4.3.
Fields§
§pred_id: PredicateIdPredicate identifier (must exist in catalog).
arity: u8Number of significant arguments. Must be ≤ ARITY_CAP.
binding_mask: u8Bit i set means argument i is bound (input). Bits ≥ arity must be 0.
args: [TermId; 8]Argument slots. Slots ≥ arity must equal TERM_SENTINEL.
Implementations§
Source§impl Atom8
impl Atom8
Sourcepub fn new(pred_id: PredicateId, arity: u8, args: &[TermId]) -> Self
pub fn new(pred_id: PredicateId, arity: u8, args: &[TermId]) -> Self
Construct an Atom8 from arity and slice of args, zero-padding the rest. Returns the atom even if it would fail admission — callers should run admission separately for kernel safety.
Sourcepub fn with_binding(self, binding_mask: u8) -> Self
pub fn with_binding(self, binding_mask: u8) -> Self
Set the binding mask. Caller must ensure mask bits ≥ arity are 0.
Trait Implementations§
impl Copy for Atom8
Source§impl<'de> Deserialize<'de> for Atom8
impl<'de> Deserialize<'de> for Atom8
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 Atom8
impl StructuralPartialEq for Atom8
Auto Trait Implementations§
impl Freeze for Atom8
impl RefUnwindSafe for Atom8
impl Send for Atom8
impl Sync for Atom8
impl Unpin for Atom8
impl UnsafeUnpin for Atom8
impl UnwindSafe for Atom8
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