Struct iced_native::renderer::Null

source ·
pub struct Null;
Expand description

A renderer that does nothing.

It can be useful if you are writing tests!

Implementations§

source§

impl Null

source

pub fn new() -> Null

Creates a new Null renderer.

Trait Implementations§

source§

impl Clone for Null

source§

fn clone(&self) -> Null

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Null

source§

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

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

impl Default for Null

source§

fn default() -> Null

Returns the “default value” for a type. Read more
source§

impl Renderer for Null

§

type Theme = Theme

The supported theme of the Renderer.
source§

fn with_layer(&mut self, _bounds: Rectangle, _f: impl FnOnce(&mut Self))

Draws the primitives recorded in the given closure in a new layer. Read more
source§

fn with_translation(&mut self, _translation: Vector, _f: impl FnOnce(&mut Self))

Applies a translation to the primitives recorded in the given closure.
source§

fn clear(&mut self)

Clears all of the recorded primitives in the Renderer.
source§

fn fill_quad(&mut self, _quad: Quad, _background: impl Into<Background>)

Fills a Quad with the provided Background.
source§

fn layout<Message>( &mut self, element: &Element<'_, Message, Self>, limits: &Limits ) -> Node

Lays out the elements of a user interface. Read more
source§

impl Renderer for Null

§

type Font = Font

The font type used.
source§

const ICON_FONT: Font = Font::Default

The icon font of the backend.
source§

const CHECKMARK_ICON: char = '0'

The char representing a ✔ icon in the ICON_FONT.
source§

const ARROW_DOWN_ICON: char = '0'

The char representing a ▼ icon in the built-in ICON_FONT.
source§

fn default_size(&self) -> f32

Returns the default size of Text.
source§

fn measure( &self, _content: &str, _size: f32, _font: Font, _bounds: Size ) -> (f32, f32)

Measures the text in the given bounds and returns the minimum boundaries that can fit the contents.
source§

fn hit_test( &self, _contents: &str, _size: f32, _font: Self::Font, _bounds: Size, _point: Point, _nearest_only: bool ) -> Option<Hit>

Tests whether the provided point is within the boundaries of text laid out with the given parameters, returning information about the nearest character. Read more
source§

fn fill_text(&mut self, _text: Text<'_, Self::Font>)

Draws the given Text.
source§

fn measure_width(&self, content: &str, size: f32, font: Self::Font) -> f32

Measures the width of the text as if it were laid out in a single line.
source§

impl Copy for Null

Auto Trait Implementations§

§

impl RefUnwindSafe for Null

§

impl Send for Null

§

impl Sync for Null

§

impl Unpin for Null

§

impl UnwindSafe for Null

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: FloatComponent, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere M: TransformMatrix<Swp, Dwp, T>,

Convert the source color to the destination color using the specified method
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> IntoColor<U> for Twhere U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
source§

impl<T> MaybeSend for Twhere T: Send,