pub struct ConfigurablePlatform<D> { /* private fields */ }Expand description
Platform implementation composed from a diagnostic sink, host limits, and a clock.
Implementations§
Source§impl<D> ConfigurablePlatform<D>
impl<D> ConfigurablePlatform<D>
Sourcepub fn new(diagnostics: D, limits: HostLimits) -> Self
pub fn new(diagnostics: D, limits: HostLimits) -> Self
Creates a platform with the given diagnostic sink and limits.
Sourcepub fn with_diagnostics(diagnostics: D) -> Self
pub fn with_diagnostics(diagnostics: D) -> Self
Creates a platform with the given diagnostic sink and default limits.
Sourcepub fn with_clock(self, clock: HostClock) -> Self
pub fn with_clock(self, clock: HostClock) -> Self
Returns a copy of this platform with the clock set to clock.
Sourcepub fn diagnostic_sink(&self) -> &D
pub fn diagnostic_sink(&self) -> &D
Returns a reference to the underlying diagnostic sink.
Sourcepub fn host_limits(&self) -> HostLimits
pub fn host_limits(&self) -> HostLimits
Returns the configured host limits.
Sourcepub fn host_clock(&self) -> HostClock
pub fn host_clock(&self) -> HostClock
Returns the configured host clock.
Trait Implementations§
Source§impl<D: Clone> Clone for ConfigurablePlatform<D>
impl<D: Clone> Clone for ConfigurablePlatform<D>
Source§fn clone(&self) -> ConfigurablePlatform<D>
fn clone(&self) -> ConfigurablePlatform<D>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D: Debug> Debug for ConfigurablePlatform<D>
impl<D: Debug> Debug for ConfigurablePlatform<D>
Source§impl<D> Platform for ConfigurablePlatform<D>where
D: DiagnosticSink,
impl<D> Platform for ConfigurablePlatform<D>where
D: DiagnosticSink,
Source§fn diagnostics(&self) -> &dyn DiagnosticSink
fn diagnostics(&self) -> &dyn DiagnosticSink
Returns the diagnostic sink for this platform.
Source§fn limits(&self) -> HostLimits
fn limits(&self) -> HostLimits
Returns host resource limits, defaulting to
HostLimits::default().Source§fn linebreak_start(&self, _request: LinebreakRequest<'_>)
fn linebreak_start(&self, _request: LinebreakRequest<'_>)
Called before the engine begins line break iteration for a paragraph.
Source§fn linebreak_next(&self) -> Option<i32>
fn linebreak_next(&self) -> Option<i32>
Returns the next line break position, or
None to use the built in algorithm.Auto Trait Implementations§
impl<D> Freeze for ConfigurablePlatform<D>where
D: Freeze,
impl<D> RefUnwindSafe for ConfigurablePlatform<D>where
D: RefUnwindSafe,
impl<D> Send for ConfigurablePlatform<D>where
D: Send,
impl<D> Sync for ConfigurablePlatform<D>where
D: Sync,
impl<D> Unpin for ConfigurablePlatform<D>where
D: Unpin,
impl<D> UnsafeUnpin for ConfigurablePlatform<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for ConfigurablePlatform<D>where
D: UnwindSafe,
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