Skip to main content

Rect

Struct Rect 

pub struct Rect {
    pub x0: f64,
    pub y0: f64,
    pub x1: f64,
    pub y1: f64,
}
Expand description

Tracks scroll events on Scroll views for testing.

This helper records viewport changes from scroll events, making it easy to verify scroll behavior in tests.

§Example

let scroll_tracker = ScrollTracker::new();

let content = Empty::new().style(|s| s.size(200.0, 400.0));
let scroll_view = scroll_tracker.track(Scroll::new(content));

let mut harness = HeadlessHarness::new_with_size(scroll_view, 100.0, 100.0);
harness.scroll_vertical(50.0, 50.0, 50.0);

let viewport = scroll_tracker.last_viewport().unwrap();
assert!(viewport.y0 > 0.0, "Should have scrolled down");

Kurbo types re-exported for convenience. A rectangle.

Fields§

§x0: f64

The minimum x coordinate (left edge).

§y0: f64

The minimum y coordinate (top edge in y-down spaces).

§x1: f64

The maximum x coordinate (right edge).

§y1: f64

The maximum y coordinate (bottom edge in y-down spaces).

Implementations§

§

impl Rect

pub const ZERO: Rect

The empty rectangle at the origin.

pub const fn new(x0: f64, y0: f64, x1: f64, y1: f64) -> Rect

A new rectangle from minimum and maximum coordinates.

pub fn from_points(p0: impl Into<Point>, p1: impl Into<Point>) -> Rect

A new rectangle from two points.

The result will have non-negative width and height.

pub fn from_origin_size(origin: impl Into<Point>, size: impl Into<Size>) -> Rect

A new rectangle from origin and size.

The result will have non-negative width and height.

pub fn from_center_size(center: impl Into<Point>, size: impl Into<Size>) -> Rect

A new rectangle from center and size.

pub fn with_origin(self, origin: impl Into<Point>) -> Rect

Create a new Rect with the same size as self and a new origin.

pub fn with_size(self, size: impl Into<Size>) -> Rect

Create a new Rect with the same origin as self and a new size.

pub fn inset(self, insets: impl Into<Insets>) -> Rect

Create a new Rect by applying the [Insets].

This will not preserve negative width and height.

§Examples
use kurbo::Rect;
let inset_rect = Rect::new(0., 0., 10., 10.,).inset(2.);
assert_eq!(inset_rect.width(), 14.0);
assert_eq!(inset_rect.x0, -2.0);
assert_eq!(inset_rect.x1, 12.0);

pub const fn width(&self) -> f64

The width of the rectangle.

Note: nothing forbids negative width.

pub const fn height(&self) -> f64

The height of the rectangle.

Note: nothing forbids negative height.

pub fn min_x(&self) -> f64

Returns the minimum value for the x-coordinate of the rectangle.

pub fn max_x(&self) -> f64

Returns the maximum value for the x-coordinate of the rectangle.

pub fn min_y(&self) -> f64

Returns the minimum value for the y-coordinate of the rectangle.

pub fn max_y(&self) -> f64

Returns the maximum value for the y-coordinate of the rectangle.

pub const fn origin(&self) -> Point

The origin of the rectangle.

This is the top left corner in a y-down space and with non-negative width and height.

pub const fn size(&self) -> Size

The size of the rectangle.

pub const fn area(&self) -> f64

The area of the rectangle.

pub const fn is_zero_area(&self) -> bool

Whether this rectangle has zero area.

pub const fn center(&self) -> Point

The center point of the rectangle.

pub fn contains(&self, point: impl Into<Point>) -> bool

Returns true if point lies within self.

pub const fn abs(&self) -> Rect

Take absolute value of width and height.

The resulting rect has the same extents as the original, but is guaranteed to have non-negative width and height.

pub const fn union(&self, other: Rect) -> Rect

The smallest rectangle enclosing two rectangles.

Results are valid only if width and height are non-negative.

pub fn union_pt(&self, pt: impl Into<Point>) -> Rect

Compute the union with one point.

This method includes the perimeter of zero-area rectangles. Thus, a succession of union_pt operations on a series of points yields their enclosing rectangle.

Results are valid only if width and height are non-negative.

pub const fn intersect(&self, other: Rect) -> Rect

The intersection of two rectangles.

The result is zero-area if either input has negative width or height. The result always has non-negative width and height.

If you want to determine whether two rectangles intersect, use the overlaps method instead.

pub const fn overlaps(&self, other: Rect) -> bool

Determines whether this rectangle overlaps with another in any way.

Note that the edge of the rectangle is considered to be part of itself, meaning that two rectangles that share an edge are considered to overlap.

Returns true if the rectangles overlap, false otherwise.

If you want to compute the intersection of two rectangles, use the intersect method instead.

§Examples
use kurbo::Rect;

let rect1 = Rect::new(0.0, 0.0, 10.0, 10.0);
let rect2 = Rect::new(5.0, 5.0, 15.0, 15.0);
assert!(rect1.overlaps(rect2));

let rect1 = Rect::new(0.0, 0.0, 10.0, 10.0);
let rect2 = Rect::new(10.0, 0.0, 20.0, 10.0);
assert!(rect1.overlaps(rect2));

pub const fn contains_rect(&self, other: Rect) -> bool

Returns whether this rectangle contains another rectangle.

A rectangle is considered to contain another rectangle if the other rectangle is fully enclosed within the bounds of this rectangle.

§Examples
use kurbo::Rect;

let rect1 = Rect::new(0.0, 0.0, 10.0, 10.0);
let rect2 = Rect::new(2.0, 2.0, 4.0, 4.0);
assert!(rect1.contains_rect(rect2));

Two equal rectangles are considered to contain each other.

use kurbo::Rect;

let rect = Rect::new(0.0, 0.0, 10.0, 10.0);
assert!(rect.contains_rect(rect));

pub const fn inflate(&self, width: f64, height: f64) -> Rect

Expand a rectangle by a constant amount in both directions.

The logic simply applies the amount in each direction. If rectangle area or added dimensions are negative, this could give odd results.

pub fn round(self) -> Rect

Returns a new Rect, with each coordinate value rounded to the nearest integer.

§Examples
use kurbo::Rect;
let rect = Rect::new(3.3, 3.6, 3.0, -3.1).round();
assert_eq!(rect.x0, 3.0);
assert_eq!(rect.y0, 4.0);
assert_eq!(rect.x1, 3.0);
assert_eq!(rect.y1, -3.0);

pub fn ceil(self) -> Rect

Returns a new Rect, with each coordinate value rounded up to the nearest integer, unless they are already an integer.

§Examples
use kurbo::Rect;
let rect = Rect::new(3.3, 3.6, 3.0, -3.1).ceil();
assert_eq!(rect.x0, 4.0);
assert_eq!(rect.y0, 4.0);
assert_eq!(rect.x1, 3.0);
assert_eq!(rect.y1, -3.0);

pub fn floor(self) -> Rect

Returns a new Rect, with each coordinate value rounded down to the nearest integer, unless they are already an integer.

§Examples
use kurbo::Rect;
let rect = Rect::new(3.3, 3.6, 3.0, -3.1).floor();
assert_eq!(rect.x0, 3.0);
assert_eq!(rect.y0, 3.0);
assert_eq!(rect.x1, 3.0);
assert_eq!(rect.y1, -4.0);

pub fn expand(self) -> Rect

Returns a new Rect, with each coordinate value rounded away from the center of the Rect to the nearest integer, unless they are already an integer. That is to say this function will return the smallest possible Rect with integer coordinates that is a superset of self.

§Examples
use kurbo::Rect;

// In positive space
let rect = Rect::new(3.3, 3.6, 5.6, 4.1).expand();
assert_eq!(rect.x0, 3.0);
assert_eq!(rect.y0, 3.0);
assert_eq!(rect.x1, 6.0);
assert_eq!(rect.y1, 5.0);

// In both positive and negative space
let rect = Rect::new(-3.3, -3.6, 5.6, 4.1).expand();
assert_eq!(rect.x0, -4.0);
assert_eq!(rect.y0, -4.0);
assert_eq!(rect.x1, 6.0);
assert_eq!(rect.y1, 5.0);

// In negative space
let rect = Rect::new(-5.6, -4.1, -3.3, -3.6).expand();
assert_eq!(rect.x0, -6.0);
assert_eq!(rect.y0, -5.0);
assert_eq!(rect.x1, -3.0);
assert_eq!(rect.y1, -3.0);

// Inverse orientation
let rect = Rect::new(5.6, -3.6, 3.3, -4.1).expand();
assert_eq!(rect.x0, 6.0);
assert_eq!(rect.y0, -3.0);
assert_eq!(rect.x1, 3.0);
assert_eq!(rect.y1, -5.0);

pub fn trunc(self) -> Rect

Returns a new Rect, with each coordinate value rounded towards the center of the Rect to the nearest integer, unless they are already an integer. That is to say this function will return the biggest possible Rect with integer coordinates that is a subset of self.

§Examples
use kurbo::Rect;

// In positive space
let rect = Rect::new(3.3, 3.6, 5.6, 4.1).trunc();
assert_eq!(rect.x0, 4.0);
assert_eq!(rect.y0, 4.0);
assert_eq!(rect.x1, 5.0);
assert_eq!(rect.y1, 4.0);

// In both positive and negative space
let rect = Rect::new(-3.3, -3.6, 5.6, 4.1).trunc();
assert_eq!(rect.x0, -3.0);
assert_eq!(rect.y0, -3.0);
assert_eq!(rect.x1, 5.0);
assert_eq!(rect.y1, 4.0);

// In negative space
let rect = Rect::new(-5.6, -4.1, -3.3, -3.6).trunc();
assert_eq!(rect.x0, -5.0);
assert_eq!(rect.y0, -4.0);
assert_eq!(rect.x1, -4.0);
assert_eq!(rect.y1, -4.0);

// Inverse orientation
let rect = Rect::new(5.6, -3.6, 3.3, -4.1).trunc();
assert_eq!(rect.x0, 5.0);
assert_eq!(rect.y0, -4.0);
assert_eq!(rect.x1, 4.0);
assert_eq!(rect.y1, -4.0);

pub const fn scale_from_origin(self, factor: f64) -> Rect

Scales the Rect by factor with respect to the origin (the point (0, 0)).

§Examples
use kurbo::Rect;

let rect = Rect::new(2., 2., 4., 6.).scale_from_origin(2.);
assert_eq!(rect.x0, 4.);
assert_eq!(rect.x1, 8.);

pub fn to_rounded_rect(self, radii: impl Into<RoundedRectRadii>) -> RoundedRect

Creates a new [RoundedRect] from this Rect and the provided corner radius.

pub fn to_ellipse(self) -> Ellipse

Returns the [Ellipse] that is bounded by this Rect.

pub const fn aspect_ratio_width(self) -> f64

The aspect ratio of this Rect.

This is defined as the width divided by the height. It measures the “squareness” of the rectangle (a value of 1 is square).

If the height is 0, the output will be sign(self.width) * infinity. If the width and height are both 0, then the output will be NaN.

pub fn aspect_ratio(&self) -> f64

👎Deprecated since 0.12.0:

You should use aspect_ratio_width instead, as this method returns a potentially unexpected value.

The inverse of the aspect ratio of this Rect.

Aspect ratios are usually defined as the ratio of the width to the height, but this method incorrectly returns the ratio of height to width. You should generally prefer aspect_ratio_width.

If the width is 0 the output will be sign(y1 - y0) * infinity.

If the width and height are both 0, the result will be NaN.

pub const fn inscribed_rect_with_aspect_ratio(&self, aspect_ratio: f64) -> Rect

Returns the largest possible Rect with the given aspect_ratio that is fully contained in self.

The aspect ratio is specified fractionally, as width / height.

The resulting rectangle will be centered if it is smaller than this rectangle.

§Examples
let outer = Rect::new(0.0, 0.0, 10.0, 20.0);
let inner = outer.inscribed_rect_with_aspect_ratio(1.0);
// The new `Rect` is a square centered at the center of `outer`.
assert_eq!(inner, Rect::new(0.0, 5.0, 10.0, 15.0));

pub fn contained_rect_with_aspect_ratio( &self, inverse_aspect_ratio: f64, ) -> Rect

👎Deprecated since 0.12.0:

You should use inscribed_rect_with_aspect_ratio instead, as this method expects an unusually defined parameter.

Returns the largest possible Rect with the given inverse_aspect_ratio that is fully contained in self.

Aspect ratios are usually defined as the ratio of the width to the height, but this method accepts an aspect ratio specified fractionally as height / width. You should generally prefer inscribed_rect_with_aspect_ratio, which takes a “normal” aspect ratio.

The resulting rectangle will be centered if it is smaller than this rectangle.

pub const fn is_finite(&self) -> bool

Is this rectangle finite?

pub const fn is_nan(&self) -> bool

Is this rectangle NaN?

pub const fn get_coords(self, axis: Axis) -> (f64, f64)

Get the members matching the given axis.

pub const fn get_coords_mut(&mut self, axis: Axis) -> (&mut f64, &mut f64)

Get a mutable reference to the members matching the given axis.

pub const fn set_coords(&mut self, axis: Axis, v0: f64, v1: f64)

Set the members matching the given axis to the given values.

Trait Implementations§

§

impl Add<Insets> for Rect

§

type Output = Rect

The resulting type after applying the + operator.
§

fn add(self, other: Insets) -> Rect

Performs the + operation. Read more
§

impl Add<Vec2> for Rect

§

type Output = Rect

The resulting type after applying the + operator.
§

fn add(self, v: Vec2) -> Rect

Performs the + operation. Read more
§

impl Clone for Rect

§

fn clone(&self) -> Rect

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for Rect

§

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

Formats the value using the given formatter. Read more
§

impl Default for Rect

§

fn default() -> Rect

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

impl<'de> Deserialize<'de> for Rect

§

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

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

impl Display for Rect

§

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

Formats the value using the given formatter. Read more
§

impl From<(Point, Point)> for Rect

§

fn from(points: (Point, Point)) -> Rect

Converts to this type from the input type.
§

impl From<(Point, Size)> for Rect

§

fn from(params: (Point, Size)) -> Rect

Converts to this type from the input type.
§

impl PartialEq for Rect

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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.
§

impl Serialize for Rect

§

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
§

impl Shape for Rect

§

fn winding(&self, pt: Point) -> i32

Note: this function is carefully designed so that if the plane is tiled with rectangles, the winding number will be nonzero for exactly one of them.

§

type PathElementsIter<'iter> = RectPathIter

The iterator returned by the path_elements method.
§

fn path_elements(&self, _tolerance: f64) -> RectPathIter

Returns an iterator over this shape expressed as [PathEl]s; that is, as Bézier path elements. Read more
§

fn area(&self) -> f64

Signed area. Read more
§

fn perimeter(&self, _accuracy: f64) -> f64

Total length of perimeter.
§

fn bounding_box(&self) -> Rect

The smallest rectangle that encloses the shape.
§

fn as_rect(&self) -> Option<Rect>

If the shape is a rectangle, make it available.
§

fn contains(&self, pt: Point) -> bool

Returns true if the Point is inside this shape. Read more
§

fn to_path(&self, tolerance: f64) -> BezPath

Convert to a Bézier path. Read more
§

fn into_path(self, tolerance: f64) -> BezPath
where Self: Sized,

Convert into a Bézier path. Read more
§

fn path_segments(&self, tolerance: f64) -> Segments<Self::PathElementsIter<'_>>

Returns an iterator over this shape expressed as Bézier path segments (PathSegs). Read more
§

fn as_line(&self) -> Option<Line>

If the shape is a line, make it available.
§

fn as_rounded_rect(&self) -> Option<RoundedRect>

If the shape is a rounded rectangle, make it available.
§

fn as_circle(&self) -> Option<Circle>

If the shape is a circle, make it available.
§

fn as_path_slice(&self) -> Option<&[PathEl]>

If the shape is stored as a slice of path elements, make that available. Read more
Source§

impl StylePropValue for Rect

Source§

fn debug_view(&self) -> Option<Box<dyn View>>

Source§

fn interpolate(&self, other: &Rect, value: f64) -> Option<Rect>

Source§

fn content_hash(&self) -> u64

Compute a content-based hash for this value. Read more
§

impl Sub<Insets> for Rect

§

type Output = Rect

The resulting type after applying the - operator.
§

fn sub(self, other: Insets) -> Rect

Performs the - operation. Read more
§

impl Sub<Vec2> for Rect

§

type Output = Rect

The resulting type after applying the - operator.
§

fn sub(self, v: Vec2) -> Rect

Performs the - operation. Read more
§

impl Sub for Rect

§

type Output = Insets

The resulting type after applying the - operator.
§

fn sub(self, other: Rect) -> Insets

Performs the - operation. Read more
§

impl Copy for Rect

§

impl StructuralPartialEq for Rect

Auto Trait Implementations§

§

impl Freeze for Rect

§

impl RefUnwindSafe for Rect

§

impl Send for Rect

§

impl Sync for Rect

§

impl Unpin for Rect

§

impl UnsafeUnpin for Rect

§

impl UnwindSafe for Rect

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> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

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

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

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>

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> 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<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, 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<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<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
§

impl<T> Upcast<T> for T

§

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

§

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
§

impl<T> Brush for T
where T: Clone + PartialEq + Default + Debug,

Source§

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

§

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

§

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

§

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

§

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

§

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

§

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