pub struct ScldFrameRef<'a, V> {
    pub screen0: &'a ScreenArray,
    pub screen1: &'a ScreenArray,
    pub frame_cache0: &'a UlaFrameCache<V>,
    pub frame_cache1: &'a UlaFrameCache<V>,
}
Expand description

A reference to primary and secondary screen data with relevant frame caches.

Fields§

§screen0: &'a ScreenArray

primary screen data

§screen1: &'a ScreenArray

secondary screen data

§frame_cache0: &'a UlaFrameCache<V>

primary screen frame cache

§frame_cache1: &'a UlaFrameCache<V>

secondary screen frame cache

Implementations§

Examples found in repository?
src/chip/scld/frame_cache.rs (line 197)
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
    pub fn new(
            source: SourceMode,
            screen0: &'a ScreenArray,
            frame_cache0: &'a UlaFrameCache<V>,
            screen1: &'a ScreenArray,
            frame_cache1: &'a UlaFrameCache<V>,
            mut source_changes: I
        ) -> Self
    {
        let line = 0;
        let line_iter = EMPTY_LINE_ITER;
        let (next_change_at, next_source) = source_changes.next()
                    .map(|tsm| vtm_next::<V>(tsm, line as Ts))
                    .unwrap_or_else(||
                        ( VFrameTs::max_value(), source )
                    );
        let mut prod = ScldFrameProducer {
            frame_ref: ScldFrameRef::new(screen0, frame_cache0, screen1, frame_cache1),
            line,
            next_source,
            next_change_at,
            source_changes,
            source,
            line_iter
        };
        prod.update_iter();
        prod
    }
More examples
Hide additional examples
src/chip/plus/frame_cache.rs (lines 71-74)
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    pub fn new(
            swap_screens: bool,
            source: SourceMode,
            screen0: &'a ScreenArray,
            frame_cache0: &'a UlaFrameCache<V>,
            screen1: &'a ScreenArray,
            frame_cache1: &'a UlaFrameCache<V>,
            screen_shadow0: &'a ScreenArray,
            frame_cache_shadow0: &'a UlaFrameCache<V>,
            screen_shadow1: &'a ScreenArray,
            frame_cache_shadow1: &'a UlaFrameCache<V>,
            mut screen_changes: IS,
            source_changes: IM
        ) -> Self
    {
        let swap_at = screen_changes.next()
                      .map(|ts| vc_to_line::<V>(ts, 0))
                      .unwrap_or_else(VFrameTs::max_value);
        let mut scld_frame_prod = ScldFrameProducer::new(
            source,
            screen0, frame_cache0,
            screen1, frame_cache1,
            source_changes
        );
        let mut shadow_frame = ScldFrameRef::new(
            screen_shadow0, frame_cache_shadow0,
            screen_shadow1, frame_cache_shadow1,
        );
        if swap_screens {
            scld_frame_prod.swap_frame(&mut shadow_frame);
        }
        PlusFrameProducer {
            scld_frame_prod,
            shadow_frame,
            screen_changes,
            swap_at
        }
    }

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted. Read more
Causes self to use its LowerExp implementation when Debug-formatted. Read more
Causes self to use its LowerHex implementation when Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted. Read more
Causes self to use its UpperExp implementation when Debug-formatted. Read more
Causes self to use its UpperHex implementation when Debug-formatted. Read more
Formats each item in a sequence. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Convert to S a sample type from self.
Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function. Read more
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.