mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Rename DerivedRecordEdge to DerivedRecordInput
This commit is contained in:
@@ -606,7 +606,7 @@ impl<'a, 'f, N> LazyInput<'a, 'f, N> {
|
||||
#[inline(always)]
|
||||
pub fn eval<'e, Input>(&self, ctx: &Input) -> Result<crate::record::RecordValue<'e>, Interrupt>
|
||||
where
|
||||
N: crate::record::DerivedRecordEdge<'e, Input>,
|
||||
N: crate::record::DerivedRecordInput<'e, Input>,
|
||||
'f: 'e,
|
||||
{
|
||||
self.node.eval_derived(self.cell, self.input_index, ctx, self.frames)
|
||||
|
||||
@@ -12,12 +12,12 @@ use crate::node::Node;
|
||||
/// `for<'d> Node<Derived<'d, C>>` cannot also say the derived context's arena
|
||||
/// is at `'d`: the equality binding `ExtractArena<ArenaRef = &'d Arena>` is an
|
||||
/// unconstrained position under a higher rank.
|
||||
pub trait DerivedRecordEdge<'derived, C> {
|
||||
pub trait DerivedRecordInput<'derived, C> {
|
||||
fn eval_derived(&self, cell: &crate::node::StatusCell, input_index: usize, ctx: &C, frames: &Frames<'derived>) -> Result<RecordValue<'derived>, crate::gpoll::Interrupt>;
|
||||
fn extent_at_derived(&self, ctx: &C, level: u8, frames: &Frames<'derived>) -> GPoll<crate::gpoll::Extent>;
|
||||
}
|
||||
|
||||
impl<'derived, C, N> DerivedRecordEdge<'derived, C> for N
|
||||
impl<'derived, C, N> DerivedRecordInput<'derived, C> for N
|
||||
where
|
||||
N: Node<C>,
|
||||
C: crate::context::ExtractArena<ArenaRef = &'derived crate::arena::Arena>,
|
||||
@@ -248,7 +248,7 @@ impl<'a, 'e, Out, N> ElementEdge<'a, 'e, Out, N> {
|
||||
/// again at the next one.
|
||||
pub fn eval<'d, C>(&self, ctx: &C) -> GPoll<Out>
|
||||
where
|
||||
N: DerivedRecordEdge<'d, C>,
|
||||
N: DerivedRecordInput<'d, C>,
|
||||
'e: 'd,
|
||||
{
|
||||
let cell = crate::node::StatusCell::new();
|
||||
@@ -316,7 +316,7 @@ impl<'a, 'e, Out, N> ElementLazyInput<'a, 'e, Out, N> {
|
||||
/// the record's claim dies with the call.
|
||||
pub fn eval<'d, C>(&self, ctx: &C) -> Result<Out, crate::gpoll::Interrupt>
|
||||
where
|
||||
N: DerivedRecordEdge<'d, C>,
|
||||
N: DerivedRecordInput<'d, C>,
|
||||
'e: 'd,
|
||||
{
|
||||
let scope = self.frames.scope();
|
||||
@@ -351,7 +351,7 @@ impl<'a, 'e, N> RecordLazyInput<'a, 'e, N> {
|
||||
|
||||
pub fn eval<'d, C>(&self, ctx: &C) -> Result<RecordValue<'e>, crate::gpoll::Interrupt>
|
||||
where
|
||||
N: DerivedRecordEdge<'d, C>,
|
||||
N: DerivedRecordInput<'d, C>,
|
||||
'e: 'd,
|
||||
{
|
||||
Ok(self.node.eval_derived(self.cell, self.input_index, ctx, self.frames)?.rebind())
|
||||
@@ -363,7 +363,7 @@ impl<'a, 'e, N> RecordLazyInput<'a, 'e, N> {
|
||||
pub fn inner_extent<B>(&self, ctx: &B) -> Result<u64, crate::gpoll::Interrupt>
|
||||
where
|
||||
B: crate::context::DeriveCtx,
|
||||
N: for<'d> DerivedRecordEdge<'d, crate::context::Derived<'d, B>>,
|
||||
N: for<'d> DerivedRecordInput<'d, crate::context::Derived<'d, B>>,
|
||||
{
|
||||
inner_extent_of(self.node, ctx, 0, self.inner_levels, self.input_index, self.frames)
|
||||
}
|
||||
@@ -373,7 +373,7 @@ impl<'a, 'e, N> RecordLazyInput<'a, 'e, N> {
|
||||
pub fn inner_extent_at<B>(&self, ctx: &B, copy: u64) -> Result<u64, crate::gpoll::Interrupt>
|
||||
where
|
||||
B: crate::context::DeriveCtx,
|
||||
N: for<'d> DerivedRecordEdge<'d, crate::context::Derived<'d, B>>,
|
||||
N: for<'d> DerivedRecordInput<'d, crate::context::Derived<'d, B>>,
|
||||
{
|
||||
inner_extent_of(self.node, ctx, copy, self.inner_levels, self.input_index, self.frames)
|
||||
}
|
||||
@@ -383,7 +383,7 @@ impl<'a, 'e, N> RecordLazyInput<'a, 'e, N> {
|
||||
fn inner_extent_of<B, N>(node: &N, ctx: &B, copy: u64, levels: u8, input_index: usize, frames: &Frames<'_>) -> Result<u64, crate::gpoll::Interrupt>
|
||||
where
|
||||
B: crate::context::DeriveCtx,
|
||||
N: for<'d> DerivedRecordEdge<'d, crate::context::Derived<'d, B>>,
|
||||
N: for<'d> DerivedRecordInput<'d, crate::context::Derived<'d, B>>,
|
||||
{
|
||||
let mut frame = crate::context::IndexLink { index: 0, outer: None };
|
||||
let derived = ctx.push_level(&mut frame, copy, 0);
|
||||
@@ -405,7 +405,7 @@ where
|
||||
fn probed_inner<B, N>(node: &N, ctx: &B, copy: u64, input_index: usize, frames: &Frames<'_>) -> Result<u64, crate::gpoll::Interrupt>
|
||||
where
|
||||
B: crate::context::DeriveCtx,
|
||||
N: for<'d> DerivedRecordEdge<'d, crate::context::Derived<'d, B>>,
|
||||
N: for<'d> DerivedRecordInput<'d, crate::context::Derived<'d, B>>,
|
||||
{
|
||||
let cell = crate::node::StatusCell::new();
|
||||
let mut count: u64 = 0;
|
||||
@@ -466,14 +466,14 @@ impl<'a, 'e, Out, N> DerivedLazyInput<'a, 'e, Out, N> {
|
||||
pub fn inner_extent<B>(&self, ctx: &B) -> Result<u64, crate::gpoll::Interrupt>
|
||||
where
|
||||
B: crate::context::DeriveCtx,
|
||||
N: for<'d> DerivedRecordEdge<'d, crate::context::Derived<'d, B>>,
|
||||
N: for<'d> DerivedRecordInput<'d, crate::context::Derived<'d, B>>,
|
||||
{
|
||||
inner_extent_of(self.node, ctx, 0, self.inner_levels, self.input_index, self.frames)
|
||||
}
|
||||
|
||||
pub fn eval<'d, C>(&self, ctx: &C) -> Result<Out, crate::gpoll::Interrupt>
|
||||
where
|
||||
N: DerivedRecordEdge<'d, C>,
|
||||
N: DerivedRecordInput<'d, C>,
|
||||
'e: 'd,
|
||||
{
|
||||
let value: RecordValue<'e> = self.node.eval_derived(self.cell, self.input_index, ctx, self.frames)?.rebind();
|
||||
|
||||
@@ -23,7 +23,7 @@ mod testkit;
|
||||
|
||||
pub use access::{Rec, RecordValue, apply_plan, borrow_element, erase_static, read_at, read_element, token_only, write_element, write_element_sized, write_field};
|
||||
pub use frames::{FrameArena, FrameScope, Frames};
|
||||
pub use input::{DerivedLazyInput, DerivedRecordEdge, ElementEdge, ElementLazyInput, LevelStatus, RecordEdgeInput, RecordExtract, RecordLazyInput, fill_frames, materialize_batch, materialize_level};
|
||||
pub use input::{DerivedLazyInput, DerivedRecordInput, ElementEdge, ElementLazyInput, LevelStatus, RecordEdgeInput, RecordExtract, RecordLazyInput, fill_frames, materialize_batch, materialize_level};
|
||||
pub use layout::{
|
||||
ElToken, ElementSpec, ElementWrite, ElementWritePick, ElementWritePickHashed, ElementWritePickPlain, FieldDesc, FieldOffset, FieldWrite, InputReads, Layout, LayoutMeta, RecordLayout, copy_plan,
|
||||
element_dims, element_parked, element_write, element_write_hashed, empty_layout,
|
||||
|
||||
@@ -421,7 +421,7 @@ mod tests {
|
||||
C: Ctx + crate::context::DeriveCtx,
|
||||
T: Clone + 'static,
|
||||
Vec<T>: Send + Sync + dyn_any::StaticTypeSized,
|
||||
Node0: for<'x> crate::record::DerivedRecordEdge<'x, crate::context::Derived<'x, C>>,
|
||||
Node0: for<'x> crate::record::DerivedRecordInput<'x, crate::context::Derived<'x, C>>,
|
||||
{
|
||||
fn serve<'e, 'l>(&self, input: &C, mut slot: FrameClaim<'e, 'l>) -> GPoll<Served<'e>>
|
||||
where
|
||||
@@ -497,7 +497,7 @@ mod tests {
|
||||
impl<C, Node0> Node<C> for ShiftFootprintNode<Node0>
|
||||
where
|
||||
C: Ctx + crate::context::DeriveCtx + crate::context::ExtractFootprint,
|
||||
Node0: for<'x> crate::record::DerivedRecordEdge<'x, crate::context::Derived<'x, C>>,
|
||||
Node0: for<'x> crate::record::DerivedRecordInput<'x, crate::context::Derived<'x, C>>,
|
||||
{
|
||||
fn serve<'e, 'l>(&self, input: &C, mut slot: FrameClaim<'e, 'l>) -> GPoll<Served<'e>>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user