Skip to main content

DynamicObject

Enum DynamicObject 

Source
pub enum DynamicObject {
Show 23 variants Cube { size: [f64; 3], }, Sphere { radius: f64, segments: usize, stacks: usize, }, Cylinder { radius: f64, height: f64, segments: usize, }, Cone { radius: f64, height: f64, segments: usize, }, Circle { radius: f64, segments: usize, }, Square { size: [f64; 2], }, Polygon { points: Vec<[f64; 2]>, }, Sketch { data: SketchData, }, Union { children: Vec<DynamicObject>, }, Difference { children: Vec<DynamicObject>, }, Intersection { children: Vec<DynamicObject>, }, Translate { offset: [f64; 3], child: Box<DynamicObject>, }, Rotate { angles: [f64; 3], child: Box<DynamicObject>, }, Scale { factors: [f64; 3], child: Box<DynamicObject>, }, Mirror { axis: [f64; 3], child: Box<DynamicObject>, }, Color { color: [f64; 4], child: Box<DynamicObject>, }, Material { material: MaterialData, child: Box<DynamicObject>, }, LinearExtrude { height: f64, twist: f64, scale: f64, slices: usize, child: Box<DynamicObject>, }, Revolve { angle_degrees: f64, segments: usize, child: Box<DynamicObject>, }, Offset { delta: f64, round: bool, chamfer: bool, segments: usize, child: Box<DynamicObject>, }, EdgeFeature { data: EdgeFeatureData, child: Box<DynamicObject>, }, Group { children: Vec<DynamicObject>, }, Empty,
}
Expand description

A dynamically-typed CSG object node.

Implements Object so it can be used anywhere a static rscad-core object can, and can be serialized/deserialized when the serde feature is enabled.

Variants§

§

Cube

Fields

§size: [f64; 3]
§

Sphere

Fields

§radius: f64
§segments: usize
§stacks: usize
§

Cylinder

Fields

§radius: f64
§height: f64
§segments: usize
§

Cone

Fields

§radius: f64
§height: f64
§segments: usize
§

Circle

Fields

§radius: f64
§segments: usize
§

Square

Fields

§size: [f64; 2]
§

Polygon

Fields

§points: Vec<[f64; 2]>
§

Sketch

Constraint-based 2D sketch (see crate::sketch). Lives in its local XZ plane like the other 2D primitives.

Fields

§

Union

Implicit union of all children.

Fields

§children: Vec<DynamicObject>
§

Difference

First child minus all subsequent children.

Fields

§children: Vec<DynamicObject>
§

Intersection

Intersection of all children.

Fields

§children: Vec<DynamicObject>
§

Translate

Fields

§offset: [f64; 3]
§

Rotate

Rotation in degrees (OpenSCAD convention).

Fields

§angles: [f64; 3]
§

Scale

Fields

§factors: [f64; 3]
§

Mirror

Fields

§axis: [f64; 3]
§

Color

RGBA color (0.0–1.0).

Fields

§color: [f64; 4]
§

Material

PBR surface finish (metallic/roughness); albedo stays in Self::Color.

Fields

§material: MaterialData
§

LinearExtrude

Fields

§height: f64
§twist: f64
§scale: f64
§slices: usize
§

Revolve

Revolve the child 2D profile about its local Y axis (OpenSCAD rotate_extrude). Profile-x is the radius (x ≥ 0 expected).

Fields

§angle_degrees: f64
§segments: usize
§

Offset

Grow/shrink the child 2D profile by delta (OpenSCAD offset()).

Fields

§delta: f64
§round: bool

Round corners (offset(r=…)); when set, chamfer is ignored.

§chamfer: bool

Cut off miter spikes (offset(delta=…, chamfer=true)).

§segments: usize

Arc tessellation for round joins.

§

EdgeFeature

Chamfer/fillet the child’s selected edges. Backends never see this variant directly — it lowers to plain CSG masks against the child ([crate::feature::lower]), re-resolved on every evaluation so the feature follows parameter edits.

§

Group

Implicit union of children (convenience wrapper).

Fields

§children: Vec<DynamicObject>
§

Empty

Empty geometry — produces no polygons.

Implementations§

Source§

impl DynamicObject

Source

pub fn extract_top_transforms(&self) -> ExtractedTransforms<'_>

Peel off top-level Translate/Rotate/Scale/Color nodes that are not under any boolean operation, producing an accumulated affine matrix, an optional color, and a reference to the remaining inner subtree.

Extraction stops at booleans (Union, Difference, Intersection), Mirror (negative scale breaks face winding), LinearExtrude, Group, primitives, and Empty.

Trait Implementations§

Source§

impl Clone for DynamicObject

Source§

fn clone(&self) -> DynamicObject

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 Debug for DynamicObject

Source§

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

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

impl<'de> Deserialize<'de> for DynamicObject

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<DynamicObject, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Object for DynamicObject

Source§

fn name(&self) -> Option<&'static str>

Source§

impl PartialEq for DynamicObject

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DynamicObject

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<B> ToCsg<B> for DynamicObject
where B: DynamicBackend,

Source§

fn to_csg(&self) -> <B as CsgBackend>::CsgType

Source§

impl ToDynamic for DynamicObject

Source§

impl<B> ToSketch<B> for DynamicObject
where B: DynamicBackend,

Source§

impl StructuralPartialEq for DynamicObject

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

§

fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U

Return the T [ShaderType] for self. When used in [AsBindGroup] derives, it is safe to assume that all images in self exist.
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
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

Source§

impl<T> CenterObject for T
where T: Object,

Source§

fn centered(self, centered: bool) -> Centered<Self>
where Self: Object + Sized,

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> ColorObject for T
where T: Object,

Source§

fn colored(self, color: impl ColorFormat) -> Colored<T>

Source§

impl<T> DifferenceObject for T
where T: Object,

Source§

fn difference<Other>(self, other: Other) -> Difference<Self, Other>
where Other: Object,

§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

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

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T> IntersectionObject for T
where T: Object,

Source§

fn intersection<Other>(self, other: Other) -> Intersection<Self, Other>
where Other: Object,

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

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

§

type Proj<U: 'src> = U

§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
§

impl<A> Is for A
where A: Any,

§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Source§

impl<T> LinearPatternObject for T
where T: Object + Clone,

Source§

fn repeat<const N: usize>( self, offset: impl Number, direction: DVec3, ) -> Pattern<Self, N>
where Self: Sized,

Source§

fn repeated( self, offset: impl Number, direction: DVec3, times: usize, ) -> PatternRuntime<Self>
where Self: Sized,

Source§

impl<T> MirrorObject for T
where T: Object,

Source§

fn mirror<T>(self, x: T, y: T, z: T) -> Mirror<Self>
where T: Number, Self: Sized,

Source§

fn mirror_x<T>(self, x: T) -> Mirror<Self>
where T: Number, Self: Sized,

Source§

fn mirror_y<T>(self, y: T) -> Mirror<Self>
where T: Number, Self: Sized,

Source§

fn mirror_z<T>(self, z: T) -> Mirror<Self>
where T: Number, Self: Sized,

Source§

fn mirror_xy<T>(self, x: T, y: T) -> Mirror<Self>
where T: Number, Self: Sized,

Source§

fn mirror_xz<T>(self, x: T, z: T) -> Mirror<Self>
where T: Number, Self: Sized,

Source§

fn mirror_yz<T>(self, y: T, z: T) -> Mirror<Self>
where T: Number, Self: Sized,

§

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

§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling [Attribute] value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi [Quirk] value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1:

renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the [Condition] value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> ProjectionObject<T> for T
where T: Object,

Source§

fn project(self) -> Projection<Self>

Source§

impl<T> RotateObject for T
where T: Object,

Source§

fn rotate<T>(self, x: T, y: T, z: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

fn rotate_x<T>(self, x: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

fn rotate_y<T>(self, y: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

fn rotate_z<T>(self, z: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

fn rotate_xy<T>(self, x: T, y: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

fn rotate_yz<T>(self, y: T, z: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

fn rotate_xz<T>(self, x: T, z: T) -> Rotate<Self>
where T: Number, Self: Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ScaleObject for T
where T: Object,

Source§

fn scale_uniform<T>(self, scaler: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale<T>(self, x: T, y: T, z: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale_x<T>(self, x: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale_y<T>(self, y: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale_z<T>(self, z: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale_xy<T>(self, x: T, y: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale_xz<T>(self, x: T, z: T) -> Scale<Self>
where T: Number, Self: Sized,

Source§

fn scale_yz<T>(self, y: T, z: T) -> Scale<Self>
where T: Number, Self: Sized,

§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a [MaybeRef].
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

§

impl<T, S> SpanWrap<S> for T
where S: WrappingSpan<T>,

§

fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned

Invokes [WrappingSpan::make_wrapped] to wrap an AST node in a span.
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T> TranslateObject for T
where T: Object,

Source§

fn translate<T>(self, x: T, y: T, z: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_x<T>(self, x: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_y<T>(self, y: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_z<T>(self, z: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_xy<T>(self, x: T, y: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_xz<T>(self, x: T, z: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_yz<T>(self, y: T, z: T) -> Translate<Self>
where T: Number, Self: Sized,

Source§

fn translate_vector(self, vector: DVec3) -> Translate<Self>
where Self: Sized,

Source§

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

Source§

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 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<A, B> TwoContainerObject<B> for A
where A: Object, B: Object,

Source§

fn and(self, other: B) -> TwoContainer<Self, B>
where Self: Sized,

Source§

fn copy_and(self, process: impl FnOnce(Self) -> B) -> TwoContainer<Self, B>
where Self: Sized + Copy,

Source§

fn clone_and(self, process: impl FnOnce(Self) -> B) -> TwoContainer<Self, B>
where Self: Sized + Clone,

§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

§

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of this value.
Source§

impl<T> UnionObject for T
where T: Object,

Source§

fn union<Other>(self, other: Other) -> Union<Self, Other>
where Other: Object,

§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> XorObject for T
where T: Object,

Source§

fn xor<Other>(self, other: Other) -> Xor<Self, Other>
where Other: Object,

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> ConditionalSend for T
where T: Send,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

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

§

impl<T> HitDataExtra for T
where T: Send + Sync + Debug + Any + 'static,

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

§

impl<T> OpaqueAttachment for T
where T: Send + Sync + 'static,

§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<T> Settings for T
where T: 'static + Send + Sync,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,