Skip to main content

ShowData

Struct ShowData 

Source
pub struct ShowData {
    pub lemma_type: LemmaType,
    pub path: Vec<PathSegment>,
    pub value: Option<RuleResultValue>,
    pub suggestion: Option<RuleResultValue>,
    pub needed_by_rules: Vec<String>,
    pub list_writes: Option<ListWrites>,
}
Expand description

One data entry in a Show.

A named struct instead of a tuple so JSON-native consumers (TypeScript, Python, …) get stable field names. fill is a spec literal or literal with binding; suggestion is a -> suggest ... hint only. Empty needed_by_rules means the slot is offered for reuse (data x: alias.slot), not needed by this spec’s remaining rules after normalize.

Fields§

§lemma_type: LemmaType§path: Vec<PathSegment>

Import hops to this slot ([] = this spec). Clone of DataPath::segments.

§value: Option<RuleResultValue>§suggestion: Option<RuleResultValue>§needed_by_rules: Vec<String>

Show.rules keys that transitively need this data after normalize. Show.data only includes slots where this is non-empty.

§list_writes: Option<ListWrites>

For an instance list whose uses writes on every row: those fields (rule 2), which are no inputs of its rows.

Implementations§

Source§

impl ShowData

Source

pub fn is_global(&self) -> bool

Whether this is data of a global: given once at the top, never in a row.

Trait Implementations§

Source§

impl Clone for ShowData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ShowData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ShowData

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ShowData

Auto Trait Implementations§

§

impl Forget for ShowData

§

impl Freeze for ShowData

§

impl Move for ShowData

§

impl RefUnwindSafe for ShowData

§

impl Send for ShowData
where RawVecInner: Send, Arc<str>: Send, NodeRef<Owned, Dimension, i32, LeafOrInternal>: Send, BoxRaw<(Dimension, i32)>: Send, Arc<LemmaType>: Send, BoxRaw<TypedLiteral>: Send, Arc<RowInstance>: Send, BoxRaw<InstanceKey>: Send, Arc<[TypedLiteral]>: Send, Arc<RowStore>: Send, Arc<KeyIndex>: Send, Arc<InstanceFactors>: Send, NodeRef<Owned, String, Decimal, LeafOrInternal>: Send, BoxRaw<(String, Decimal)>: Send, BoxRaw<RangeResult>: Send, BoxRaw<SpecResult>: Send, RawTable<usize>: Send, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send, BoxRaw<(String, SetValZST)>: Send,

§

impl Sync for ShowData
where RawVecInner: Sync, Arc<str>: Sync, NodeRef<Owned, Dimension, i32, LeafOrInternal>: Sync, BoxRaw<(Dimension, i32)>: Sync, Arc<LemmaType>: Sync, BoxRaw<TypedLiteral>: Sync, Arc<RowInstance>: Sync, BoxRaw<InstanceKey>: Sync, Arc<[TypedLiteral]>: Sync, Arc<RowStore>: Sync, Arc<KeyIndex>: Sync, Arc<InstanceFactors>: Sync, NodeRef<Owned, String, Decimal, LeafOrInternal>: Sync, BoxRaw<(String, Decimal)>: Sync, BoxRaw<RangeResult>: Sync, BoxRaw<SpecResult>: Sync, RawTable<usize>: Sync, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Sync, BoxRaw<(String, SetValZST)>: Sync,

§

impl Unpin for ShowData
where *const u8 is !null: Unpin, Arc<str>: Unpin, *const LeafNode<Dimension, i32> is !null: Unpin, Box<(Dimension, i32)>: Unpin, Arc<LemmaType>: Unpin, Box<TypedLiteral>: Unpin, Arc<RowInstance>: Unpin, Box<InstanceKey>: Unpin, Arc<[TypedLiteral]>: Unpin, Arc<RowStore>: Unpin, Arc<KeyIndex>: Unpin, Arc<InstanceFactors>: Unpin, *const LeafNode<String, Decimal> is !null: Unpin, Box<(String, Decimal)>: Unpin, Box<RangeResult>: Unpin, Box<SpecResult>: Unpin, *const LeafNode<String, SetValZST> is !null: Unpin, Box<(String, SetValZST)>: Unpin,

§

impl UnsafeUnpin for ShowData

§

impl UnwindSafe for ShowData

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.