Skip to main content

SyntaxKind

Enum SyntaxKind 

Source
#[repr(u8)]
pub enum SyntaxKind {
Show 134 variants End = 0, Error = 1, Shebang = 2, LineComment = 3, BlockComment = 4, Markup = 5, Text = 6, Space = 7, Linebreak = 8, Parbreak = 9, Escape = 10, Shorthand = 11, SmartQuote = 12, Strong = 13, Emph = 14, Raw = 15, RawLang = 16, RawDelim = 17, RawTrimmed = 18, Link = 19, Label = 20, Ref = 21, RefMarker = 22, Heading = 23, HeadingMarker = 24, ListItem = 25, ListMarker = 26, EnumItem = 27, EnumMarker = 28, TermItem = 29, TermMarker = 30, Equation = 31, Math = 32, MathText = 33, MathIdent = 34, MathShorthand = 35, MathAlignPoint = 36, MathDelimited = 37, MathAttach = 38, MathPrimes = 39, MathFrac = 40, MathRoot = 41, Hash = 42, LeftBrace = 43, RightBrace = 44, LeftBracket = 45, RightBracket = 46, LeftParen = 47, RightParen = 48, Comma = 49, Semicolon = 50, Colon = 51, Star = 52, Underscore = 53, Dollar = 54, Plus = 55, Minus = 56, Slash = 57, Hat = 58, Prime = 59, Dot = 60, Eq = 61, EqEq = 62, ExclEq = 63, Lt = 64, LtEq = 65, Gt = 66, GtEq = 67, PlusEq = 68, HyphEq = 69, StarEq = 70, SlashEq = 71, Dots = 72, Arrow = 73, Root = 74, Not = 75, And = 76, Or = 77, None = 78, Auto = 79, Let = 80, Set = 81, Show = 82, Context = 83, If = 84, Else = 85, For = 86, In = 87, While = 88, Break = 89, Continue = 90, Return = 91, Import = 92, Include = 93, As = 94, Code = 95, Ident = 96, Bool = 97, Int = 98, Float = 99, Numeric = 100, Str = 101, CodeBlock = 102, ContentBlock = 103, Parenthesized = 104, Array = 105, Dict = 106, Named = 107, Keyed = 108, Unary = 109, Binary = 110, FieldAccess = 111, FuncCall = 112, Args = 113, Spread = 114, Closure = 115, Params = 116, LetBinding = 117, SetRule = 118, ShowRule = 119, Contextual = 120, Conditional = 121, WhileLoop = 122, ForLoop = 123, ModuleImport = 124, ImportItems = 125, ImportItemPath = 126, RenamedImportItem = 127, ModuleInclude = 128, LoopBreak = 129, LoopContinue = 130, FuncReturn = 131, Destructuring = 132, DestructAssignment = 133,
}
Expand description

A syntactical building block of a Typst file.

Can be created by the lexer or by the parser.

Variants§

§

End = 0

The end of token stream.

§

Error = 1

An invalid sequence of characters.

§

Shebang = 2

A shebang: #! ...

§

LineComment = 3

A line comment: // ....

§

BlockComment = 4

A block comment: /* ... */.

§

Markup = 5

The contents of a file or content block.

§

Text = 6

Plain text without markup.

§

Space = 7

Whitespace. Contains at most one newline in markup, as more indicate a paragraph break.

§

Linebreak = 8

A forced line break: \.

§

Parbreak = 9

A paragraph break, indicated by one or multiple blank lines.

§

Escape = 10

An escape sequence: \#, \u{1F5FA}.

§

Shorthand = 11

A shorthand for a unicode codepoint. For example, ~ for non-breaking space or -? for a soft hyphen.

§

SmartQuote = 12

A smart quote: ' or ".

§

Strong = 13

Strong content: *Strong*.

§

Emph = 14

Emphasized content: _Emphasized_.

§

Raw = 15

Raw text with optional syntax highlighting: `...`.

§

RawLang = 16

A language tag at the start of raw text: typ .

§

RawDelim = 17

A raw delimiter consisting of 1 or 3+ backticks: `.

§

RawTrimmed = 18

A sequence of whitespace to ignore in a raw text: .

A hyperlink: https://typst.org.

§

Label = 20

A label: <intro>.

§

Ref = 21

A reference: @target, @target[..].

§

RefMarker = 22

Introduces a reference: @target.

§

Heading = 23

A section heading: = Introduction.

§

HeadingMarker = 24

Introduces a section heading: =, ==, …

§

ListItem = 25

An item in a bullet list: - ....

§

ListMarker = 26

Introduces a list item: -.

§

EnumItem = 27

An item in an enumeration (numbered list): + ... or 1. ....

§

EnumMarker = 28

Introduces an enumeration item: +, 1..

§

TermItem = 29

An item in a term list: / Term: Details.

§

TermMarker = 30

Introduces a term item: /.

§

Equation = 31

A mathematical equation: $x$, $ x^2 $.

§

Math = 32

The contents of a mathematical equation: x^2 + 1.

§

MathText = 33

A lone text fragment in math: x, 25, 3.1415, =, |, [.

§

MathIdent = 34

An identifier in math: pi.

§

MathShorthand = 35

A shorthand for a unicode codepoint in math: a <= b.

§

MathAlignPoint = 36

An alignment point in math: &.

§

MathDelimited = 37

Matched delimiters in math: [x + y].

§

MathAttach = 38

A base with optional attachments in math: a_1^2.

§

MathPrimes = 39

Grouped primes in math: a'''.

§

MathFrac = 40

A fraction in math: x/2.

§

MathRoot = 41

A root in math: √x, ∛x or ∜x.

§

Hash = 42

A hash that switches into code mode: #.

§

LeftBrace = 43

A left curly brace, starting a code block: {.

§

RightBrace = 44

A right curly brace, terminating a code block: }.

§

LeftBracket = 45

A left square bracket, starting a content block: [.

§

RightBracket = 46

A right square bracket, terminating a content block: ].

§

LeftParen = 47

A left round parenthesis, starting a grouped expression, collection, argument or parameter list: (.

§

RightParen = 48

A right round parenthesis, terminating a grouped expression, collection, argument or parameter list: ).

§

Comma = 49

A comma separator in a sequence: ,.

§

Semicolon = 50

A semicolon terminating an expression: ;.

§

Colon = 51

A colon between name/key and value in a dictionary, argument or parameter list, or between the term and body of a term list term: :.

§

Star = 52

The strong text toggle, multiplication operator, and wildcard import symbol: *.

§

Underscore = 53

Toggles emphasized text and indicates a subscript in math: _.

§

Dollar = 54

Starts and ends a mathematical equation: $.

§

Plus = 55

The unary plus and binary addition operator: +.

§

Minus = 56

The unary negation and binary subtraction operator: -.

§

Slash = 57

The division operator and fraction operator in math: /.

§

Hat = 58

The superscript operator in math: ^.

§

Prime = 59

The prime in math: '.

§

Dot = 60

The field access and method call operator: ..

§

Eq = 61

The assignment operator: =.

§

EqEq = 62

The equality operator: ==.

§

ExclEq = 63

The inequality operator: !=.

§

Lt = 64

The less-than operator: <.

§

LtEq = 65

The less-than or equal operator: <=.

§

Gt = 66

The greater-than operator: >.

§

GtEq = 67

The greater-than or equal operator: >=.

§

PlusEq = 68

The add-assign operator: +=.

§

HyphEq = 69

The subtract-assign operator: -=.

§

StarEq = 70

The multiply-assign operator: *=.

§

SlashEq = 71

The divide-assign operator: /=.

§

Dots = 72

Indicates a spread or sink: ...

§

Arrow = 73

An arrow between a closure’s parameters and body: =>.

§

Root = 74

A root: √, ∛ or ∜.

§

Not = 75

The not operator.

§

And = 76

The and operator.

§

Or = 77

The or operator.

§

None = 78

The none literal.

§

Auto = 79

The auto literal.

§

Let = 80

The let keyword.

§

Set = 81

The set keyword.

§

Show = 82

The show keyword.

§

Context = 83

The context keyword.

§

If = 84

The if keyword.

§

Else = 85

The else keyword.

§

For = 86

The for keyword.

§

In = 87

The in keyword.

§

While = 88

The while keyword.

§

Break = 89

The break keyword.

§

Continue = 90

The continue keyword.

§

Return = 91

The return keyword.

§

Import = 92

The import keyword.

§

Include = 93

The include keyword.

§

As = 94

The as keyword.

§

Code = 95

The contents of a code block.

§

Ident = 96

An identifier: it.

§

Bool = 97

A boolean: true, false.

§

Int = 98

An integer: 120.

§

Float = 99

A floating-point number: 1.2, 10e-4.

§

Numeric = 100

A numeric value with a unit: 12pt, 3cm, 2em, 90deg, 50%.

§

Str = 101

A quoted string: "...".

§

CodeBlock = 102

A code block: { let x = 1; x + 2 }.

§

ContentBlock = 103

A content block: [*Hi* there!].

§

Parenthesized = 104

A grouped expression: (1 + 2).

§

Array = 105

An array: (1, "hi", 12cm).

§

Dict = 106

A dictionary: (thickness: 3pt, dash: "solid").

§

Named = 107

A named pair: thickness: 3pt.

§

Keyed = 108

A keyed pair: "spacy key": true.

§

Unary = 109

A unary operation: -x.

§

Binary = 110

A binary operation: a + b.

§

FieldAccess = 111

A field access: properties.age.

§

FuncCall = 112

An invocation of a function or method: f(x, y).

§

Args = 113

A function call’s argument list: (12pt, y).

§

Spread = 114

Spread arguments or an argument sink: ..x.

§

Closure = 115

A closure: (x, y) => z.

§

Params = 116

A closure’s parameters: (x, y).

§

LetBinding = 117

A let binding: let x = 1.

§

SetRule = 118

A set rule: set text(...).

§

ShowRule = 119

A show rule: show heading: it => emph(it.body).

§

Contextual = 120

A contextual expression: context text.lang.

§

Conditional = 121

An if-else conditional: if x { y } else { z }.

§

WhileLoop = 122

A while loop: while x { y }.

§

ForLoop = 123

A for loop: for x in y { z }.

§

ModuleImport = 124

A module import: import "utils.typ": a, b, c.

§

ImportItems = 125

Items to import from a module: a, b, c.

§

ImportItemPath = 126

A path to an imported name from a submodule: a.b.c.

§

RenamedImportItem = 127

A renamed import item: a as d.

§

ModuleInclude = 128

A module include: include "chapter1.typ".

§

LoopBreak = 129

A break from a loop: break.

§

LoopContinue = 130

A continue in a loop: continue.

§

FuncReturn = 131

A return from a function: return, return x + 1.

§

Destructuring = 132

A destructuring pattern: (x, _, ..y).

§

DestructAssignment = 133

A destructuring assignment expression: (x, y) = (1, 2).

Implementations§

Source§

impl SyntaxKind

Source

pub fn is_grouping(self) -> bool

Is this a bracket, brace, or parenthesis?

Source

pub fn is_terminator(self) -> bool

Does this node terminate a preceding expression?

Source

pub fn is_block(self) -> bool

Is this a code or content block.

Source

pub fn is_stmt(self) -> bool

Does this node need termination through a semicolon or linebreak?

Source

pub fn is_keyword(self) -> bool

Is this node is a keyword.

Source

pub fn is_trivia(self) -> bool

Whether this kind of node is automatically skipped by the parser in code and math mode.

Source

pub fn is_error(self) -> bool

Whether this is an error.

Source

pub fn name(self) -> &'static str

A human-readable name for the kind.

Trait Implementations§

Source§

impl Clone for SyntaxKind

Source§

fn clone(&self) -> SyntaxKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for SyntaxKind

Source§

impl Debug for SyntaxKind

Source§

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

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

impl Eq for SyntaxKind

Source§

impl Hash for SyntaxKind

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SyntaxKind

Source§

fn eq(&self, other: &SyntaxKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SyntaxKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S, T> ArcInto<T> for S
where Arc<S>: Into<T>,

Source§

fn arc_into(self: Arc<S>) -> T

Converts Arc<T> into Self.
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CallHasher for T
where T: Hash + ?Sized,

Source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T, C> ComponentsInto<C> for T

Source§

fn components_into(self) -> C

Cast this collection of color components into a collection of colors. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

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

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Filterable for T

Source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T, U> Into<U> for T
where 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> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where 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 T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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 T
where 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<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.