pub struct Integer {
    value: CSSInteger,
    was_calc: bool,
}
Expand description

A specified <integer>, optionally coming from a calc() expression.

https://drafts.csswg.org/css-values/#integers

Fields

value: CSSIntegerwas_calc: bool

Implementations

Trivially constructs a new Integer value.

Returns the integer value associated with this value.

Trivially constructs a new integer value from a calc() expression.

Parse an integer value which is at least min.

Parse a non-negative integer.

Parse a positive integer (>= 1).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

Reutrns the one value.

Returns whether this value is one.

Parse a value of this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Supported CssTypes by the given value type. Read more

Collect value starting words for the given specified value type. This includes keyword and function names which can appear at the beginning of a value of this type. Read more

The computed value type we’re going to be converted to.

Convert a specified value to a computed value, using itself and the data inside the Context. Read more

Convert a computed value to specified value form. Read more

Serialize self in CSS syntax, writing to dest.

Serialize self in CSS syntax and return a string. Read more

Clones this value into a form suitable for writing into a SharedMemoryBuilder. Read more

Returns the zero value.

Returns whether this value is zero.

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

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Convert

Convert

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more