MCPcopy Index your code
hub / github.com/endbasic/endbasic / ClampedInto

Interface ClampedInto

std/src/console/graphics.rs:37–40  ·  view source on GitHub ↗

Conversion between types with silent value clamping.

Source from the content-addressed store, hash-verified

35
36/// Conversion between types with silent value clamping.
37pub trait ClampedInto<T> {
38 /// Converts self into `T` capping values at `T`'s maximum or minimum boundaries.
39 fn clamped_into(self) -> T;
40}
41
42impl ClampedInto<usize> for i16 {
43 fn clamped_into(self) -> usize {

Callers

nothing calls this directly

Implementers 1

graphics.rsstd/src/console/graphics.rs

Calls

no outgoing calls

Tested by

no test coverage detected