Skip to main content

RefHandle

Struct RefHandle 

pub struct RefHandle<N>(/* private fields */)
where
    N: NativeDelete;
Expand description

A wrapper type that represents a native type with a pointer to the native object.

Implementations§

§

impl RefHandle<SkContext>

pub fn new_raster( options: &Handle<SkContextOptions>, ) -> Option<RefHandle<SkContext>>

Creates a context that uses software rasterization only.

§

impl RefHandle<SkImage_AsyncReadResult>

pub fn count(&self) -> usize

Returns how many planes of data are in the result. e.g. 3 for YUV data.

pub fn data(&self, i: usize) -> *const c_void

Returns the raw pixel data for a given plane.

It will be organized as per the dst ImageInfo passed in to the async read call.

Clients may wish to create a Pixmap with this data using the dst ImageInfo and Self::row_bytes().

The pointer dangles once the GPU context that produced the result is abandoned or dropped.

pub fn row_bytes(&self, i: usize) -> usize

Returns how many bytes correspond to a single row of image data

§

impl RefHandle<SkImageGenerator>

pub fn unique_id(&self) -> u32

pub fn encoded_data(&mut self) -> Option<RCHandle<SkData>>

Returns a reference to the encoded (i.e. compressed) representation of this data, or None if there is none.

pub fn info(&self) -> &Handle<SkImageInfo>

Returns the ImageInfo associated with this generator.

pub fn is_valid(&self, recorder: Option<&mut dyn Recorder>) -> bool

Returns true if this generator can be used to produce images that will be drawable to the specified recorder (or to CPU, if recorder is None).

  • recorder optional recorder

pub fn is_protected(self) -> bool

Returns true if this generator will produce protected content.

pub fn get_pixels( &mut self, info: &Handle<SkImageInfo>, pixels: &mut [u8], row_bytes: usize, ) -> bool

Decodes into the given pixels, a block of memory of size at least (info.height() - 1) * row_bytes + (info.width() * bytes_per_pixel).

Repeated calls to this function should give the same results, allowing the pixel ref to be immutable.

info is a description of the format expected by the caller. This can simply be identical to the info returned by Self::info(). This contract also allows the caller to specify different output configs, which the implementation can decide to support or not. A size that does not match Self::info() implies a request to scale. If the generator cannot perform this scale, it returns false.

  • info description of the expected format
  • pixels destination pixel buffer
  • row_bytes number of bytes per row

pub fn query_yuva_info( &self, supported_data_types: &Handle<SkYUVAPixmapInfo_SupportedDataTypes>, ) -> Option<Handle<SkYUVAPixmapInfo>>

If decoding to YUV is supported, returns Some with the planar configuration. Otherwise, returns None.

  • supported_data_types indicates the data type/planar config combinations that are supported by the caller. If the generator supports decoding to YUV(A), but not as a type in supported_data_types, this method returns None

The returned value specifies the planar configuration, subsampling, orientation, chroma siting, plane color types, and row bytes.

pub fn is_texture_generator(&self) -> bool

pub fn from_encoded( _encoded: impl Into<RCHandle<SkData>>, ) -> Option<RefHandle<SkImageGenerator>>

👎Deprecated since 0.64.0:

Removed, will return None. Use Image::deferred_from_encoded_data() or Codec::from_data()

§

impl RefHandle<SkMesh>

pub fn make( spec: impl Into<RCHandle<SkMeshSpecification>>, mode: SkMesh_Mode, vertex_buffer: impl Into<RCHandle<SkMesh_VertexBuffer>>, vertex_count: usize, vertex_offset: usize, uniforms: impl Into<Option<RCHandle<SkData>>>, children: &[ChildPtr], bounds: impl AsRef<Rect>, ) -> Result<RefHandle<SkMesh>, String>

Creates a non-indexed Mesh. If the mesh is invalid the returned string give contain the reason for the failure (e.g. the vertex buffer was null or uniform data too small).

pub fn make_indexed( spec: impl Into<RCHandle<SkMeshSpecification>>, mode: SkMesh_Mode, vertex_buffer: impl Into<RCHandle<SkMesh_VertexBuffer>>, vertex_count: usize, vertex_offset: usize, index_buffer: impl Into<RCHandle<SkMesh_IndexBuffer>>, index_count: usize, index_offset: usize, uniforms: impl Into<Option<RCHandle<SkData>>>, children: &[ChildPtr], bounds: impl AsRef<Rect>, ) -> Result<RefHandle<SkMesh>, String>

Creates an indexed Mesh. If the mesh is invalid the returned string give contain the reason for the failure (e.g. the index buffer was null or uniform data too small).

index_count (at least 3) unsigned 16-bit indices are read from index_buffer at the byte offset index_offset, which must be a multiple of 2. See Self::make() for the other parameters.

pub fn spec(&self) -> RCHandle<SkMeshSpecification>

pub fn mode(&self) -> SkMesh_Mode

pub fn vertex_buffer(&self) -> RCHandle<SkMesh_VertexBuffer>

pub fn vertex_offset(&self) -> usize

pub fn vertex_count(&self) -> usize

pub fn index_buffer(&self) -> Option<RCHandle<SkMesh_IndexBuffer>>

The index buffer, None if the mesh is not indexed.

pub fn index_offset(&self) -> usize

pub fn index_count(&self) -> usize

pub fn uniforms(&self) -> Option<RCHandle<SkData>>

pub fn children(&self) -> impl Iterator<Item = ChildPtr> + use<'_>

pub fn bounds(&self) -> Rect

pub fn is_valid(&self) -> bool

Always true for a mesh returned by Self::make() or Self::make_indexed(); an invalid mesh is reported as an error there.

§

impl RefHandle<SkPathBuilder>

pub fn new() -> RefHandle<SkPathBuilder>

Constructs an empty PathBuilder. By default, PathBuilder has no verbs, no Point, and no weights. PathFillType is set to PathFillType::Winding.

§Returns

empty PathBuilder

pub fn new_with_fill_type(fill_type: SkPathFillType) -> RefHandle<SkPathBuilder>

Constructs an empty PathBuilder with the given PathFillType. By default, PathBuilder has no verbs, no Point, and no weights.

§Returns

empty PathBuilder

pub fn new_path(path: &Handle<SkPath>) -> RefHandle<SkPathBuilder>

Constructs a PathBuilder that is a copy of an existing Path. Copies the PathFillType and replays all of the verbs from the Path into the PathBuilder.

§Returns

PathBuilder

pub fn fill_type(&self) -> SkPathFillType

Returns PathFillType, the rule used to fill Path.

§Returns

current PathFillType setting

pub fn compute_finite_bounds(&self) -> Option<Rect>

Returns minimum and maximum axes values of Point array. Returns None if PathBuilder contains no points.

Rect returned includes all Point added to PathBuilder, including Point associated with PathVerb::Move that define empty contours.

If any of the points are non-finite, returns None.

§Returns

Bounds of all Point in Point array, or None.

pub fn compute_tight_bounds(&self) -> Option<Rect>

Like Self::compute_finite_bounds() but returns a ‘tight’ bounds, meaning when there are curve segments, this computes the X/Y limits of the curve itself, not the curve’s control point(s). For a polygon, this returns the same as Self::compute_finite_bounds().

pub fn compute_bounds(&self) -> Rect

👎Deprecated since 0.91.0:

Use compute_finite_bounds() instead

Returns minimum and maximum axes values of Point array.

§Returns

Bounds of all Point in Point array, or an empty Rect if the bounds are non-finite.

§Deprecated

Use Self::compute_finite_bounds() instead, which returns None when the bounds are non-finite.

pub fn snapshot(&self) -> Handle<SkPath>

Returns a Path representing the current state of the PathBuilder. The builder is unchanged after returning the path.

§Returns

Path representing the current state of the builder.

pub fn snapshot_and_transform<'m>( &self, mx: impl Into<Option<&'m Matrix>>, ) -> Handle<SkPath>

Returns a Path representing the current state of the PathBuilder. The builder is unchanged after returning the path.

  • mx if present, applied to the points after they are copied into the resulting path.
§Returns

Path representing the current state of the builder.

pub fn detach(&mut self) -> Handle<SkPath>

Returns a Path representing the current state of the PathBuilder. The builder is reset to empty after returning the path.

§Returns

Path representing the current state of the builder.

pub fn detach_and_transform<'m>( &mut self, mx: impl Into<Option<&'m Matrix>>, ) -> Handle<SkPath>

Returns a Path representing the current state of the PathBuilder. The builder is reset to empty after returning the path.

  • mx if present, applied to the points after they are copied into the resulting path.
§Returns

Path representing the current state of the builder.

pub fn set_fill_type( &mut self, ft: SkPathFillType, ) -> &mut RefHandle<SkPathBuilder>

Sets PathFillType, the rule used to fill Path. While there is no check that ft is legal, values outside of PathFillType are not supported.

§Returns

reference to PathBuilder

pub fn set_is_volatile( &mut self, is_volatile: bool, ) -> &mut RefHandle<SkPathBuilder>

Specifies whether Path is volatile; whether it will be altered or discarded by the caller after it is drawn. Path by default have volatile set false, allowing Skia to attach a cache of data which speeds repeated drawing.

Mark temporary paths, discarded or modified after use, as volatile to inform Skia that the path need not be cached.

Mark animating Path volatile to improve performance. Mark unchanging Path non-volatile to improve repeated rendering.

raster surface Path draws are affected by volatile for some shadows. GPU surface Path draws are affected by volatile for some shadows and concave geometries.

  • is_volatile true if caller will alter Path after drawing
§Returns

reference to PathBuilder

pub fn reset(&mut self) -> &mut RefHandle<SkPathBuilder>

Sets PathBuilder to its initial state. Removes verb array, Point array, and weights, and sets PathFillType to PathFillType::Winding. Internal storage associated with PathBuilder is preserved.

§Returns

reference to PathBuilder

pub fn move_to(&mut self, pt: impl Into<Point>) -> &mut RefHandle<SkPathBuilder>

Specifies the beginning of contour. If the previous verb was a “move” verb, then this just replaces the point value of that move, otherwise it appends a new “move” verb to the builder using the point.

Thus, each contour can only have 1 move verb in it (the last one specified).

pub fn line_to(&mut self, pt: impl Into<Point>) -> &mut RefHandle<SkPathBuilder>

Adds line from last point to Point p. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding line.

line_to() first appends PathVerb::Move to verb array and (0, 0) to Point array, if needed. line_to() then appends PathVerb::Line to verb array and Point p to Point array.

  • pt end Point of added line
§Returns

reference to PathBuilder

pub fn quad_to( &mut self, p1: impl Into<Point>, p2: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Adds quad from last point towards Point p1, to Point p2. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding quad.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed; then appends PathVerb::Quad to verb array; and Point p1, p2 to Point array.

  • p1 control Point of added quad
  • p2 end Point of added quad
§Returns

reference to PathBuilder

pub fn conic_to( &mut self, p1: impl Into<Point>, p2: impl Into<Point>, w: f32, ) -> &mut RefHandle<SkPathBuilder>

Adds conic from last point towards pt1, to pt2, weighted by w. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding conic.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed.

If w is finite, positive, and not one, appends PathVerb::Conic to verb array; and pt1, pt2 to Point array; and w to conic weights.

If w is one, appends PathVerb::Quad to verb array, and pt1, pt2 to Point array.

If w is zero, this is the same as line_to(pt2).

If w is not finite, appends PathVerb::Line twice to verb array, and pt1, pt2 to Point array.

  • pt1 control Point of conic
  • pt2 end Point of conic
  • w weight of added conic
§Returns

reference to PathBuilder

pub fn cubic_to( &mut self, p1: impl Into<Point>, p2: impl Into<Point>, p3: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Adds cubic from last point towards Point p1, then towards Point p2, ending at Point p3. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding cubic.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed; then appends PathVerb::Cubic to verb array; and Point p1, p2, p3 to Point array.

  • p1 first control Point of cubic
  • p2 second control Point of cubic
  • p3 end Point of cubic
§Returns

reference to PathBuilder

pub fn close(&mut self) -> &mut RefHandle<SkPathBuilder>

Appends PathVerb::Close to PathBuilder. A closed contour connects the first and last Point with line, forming a continuous loop. Open and closed contour draw the same with crate::PaintStyle::Fill. With crate::PaintStyle::Stroke, open contour draws crate::PaintCap at contour start and end; closed contour draws crate::PaintJoin at contour start and end.

close() has no effect if PathBuilder is empty or last PathVerb is PathVerb::Close.

§Returns

reference to PathBuilder

pub fn polyline_to(&mut self, points: &[Point]) -> &mut RefHandle<SkPathBuilder>

Append a series of line_to(...)

§Returns

reference to PathBuilder

pub fn r_move_to( &mut self, pt: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Adds beginning of contour relative to last point. If PathBuilder is empty, starts contour at (dx, dy). Otherwise, start contour at last point offset by (dx, dy). Function name stands for “relative move to”.

  • pt vector offset from last point to contour start
§Returns

reference to PathBuilder

pub fn r_line_to( &mut self, pt: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Adds line from last point to vector given by pt. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding line.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed; then appends PathVerb::Line to verb array and line end to Point array. Line end is last point plus vector given by pt. Function name stands for “relative line to”.

  • pt vector offset from last point to line end
§Returns

reference to PathBuilder

pub fn r_quad_to( &mut self, pt1: impl Into<Point>, pt2: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Adds quad from last point towards vector pt1, to vector pt2. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding quad.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed; then appends PathVerb::Quad to verb array; and appends quad control and quad end to Point array. Quad control is last point plus vector pt1. Quad end is last point plus vector pt2. Function name stands for “relative quad to”.

  • pt1 offset vector from last point to quad control
  • pt2 offset vector from last point to quad end
§Returns

reference to PathBuilder

pub fn r_conic_to( &mut self, pt1: impl Into<Point>, pt2: impl Into<Point>, w: f32, ) -> &mut RefHandle<SkPathBuilder>

Adds conic from last point towards vector p1, to vector p2, weighted by w. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding conic.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed.

If w is finite, positive, and not one, next appends PathVerb::Conic to verb array, and w is recorded as conic weight; otherwise, if w is one, appends PathVerb::Quad to verb array; or if w is zero, this is the same as r_line_to(pt2); or if w is not finite, appends PathVerb::Line twice to verb array.

In all cases appends Point control and end to Point array. control is last point plus vector p1. end is last point plus vector p2.

Function name stands for “relative conic to”.

  • pt1 offset vector from last point to conic control
  • pt2 offset vector from last point to conic end
  • w weight of added conic
§Returns

reference to PathBuilder

pub fn r_cubic_to( &mut self, pt1: impl Into<Point>, pt2: impl Into<Point>, pt3: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Adds cubic from last point towards vector pt1, then towards vector pt2, to vector pt3. If PathBuilder is empty, or last PathVerb is PathVerb::Close, last point is set to (0, 0) before adding cubic.

Appends PathVerb::Move to verb array and (0, 0) to Point array, if needed; then appends PathVerb::Cubic to verb array; and appends cubic control and cubic end to Point array. Cubic control is last point plus vector (dx1, dy1). Cubic end is last point plus vector (dx2, dy2). Function name stands for “relative cubic to”.

  • pt1 offset vector from last point to first cubic control
  • pt2 offset vector from last point to second cubic control
  • pt3 offset vector from last point to cubic end
§Returns

reference to PathBuilder

pub fn r_arc_to( &mut self, r: impl Into<Point>, x_axis_rotate: f32, large_arc: SkPathBuilder_ArcSize, sweep: SkPathDirection, dxdy: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Appends arc to PathBuilder, relative to last Path Point. Arc is implemented by one or more conic, weighted to describe part of oval with radii (rx, ry) rotated by x_axis_rotate degrees. Arc curves from last PathBuilder Point to relative end Point: (dx, dy), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger. If PathBuilder is empty, the start arc Point is (0, 0).

Arc sweep is always less than 360 degrees. arc_to() appends line to end Point if either radii are zero, or if last Path Point equals end Point. arc_to() scales radii (rx, ry) to fit last Path Point and end Point if both are greater than zero but too small to describe an arc.

arc_to() appends up to four conic curves. arc_to() implements the functionality of svg arc, although SVG “sweep-flag” value is opposite the integer value of sweep; SVG “sweep-flag” uses 1 for clockwise, while PathDirection::CW cast to int is zero.

  • r radii on axes before x-axis rotation
  • x_axis_rotate x-axis rotation in degrees; positive values are clockwise
  • large_arc chooses smaller or larger arc
  • sweep chooses clockwise or counterclockwise arc
  • dxdy offset end of arc from last Path point
§Returns

reference to PathBuilder

pub fn arc_to( &mut self, oval: impl AsRef<Rect>, start_angle_deg: f32, sweep_angle_deg: f32, force_move_to: bool, ) -> &mut RefHandle<SkPathBuilder>

Appends arc to the builder. Arc added is part of ellipse bounded by oval, from start_angle through sweep_angle. Both start_angle and sweep_angle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise.

arc_to() adds line connecting the builder’s last point to initial arc point if force_move_to is false and the builder is not empty. Otherwise, added contour begins with first point of arc. Angles greater than -360 and less than 360 are treated modulo 360.

  • oval bounds of ellipse containing arc
  • start_angle_deg starting angle of arc in degrees
  • sweep_angle_deg sweep, in degrees. Positive is clockwise; treated modulo 360
  • force_move_to true to start a new contour with arc
§Returns

reference to the builder

pub fn arc_to_tangent( &mut self, p1: impl Into<Point>, p2: impl Into<Point>, radius: f32, ) -> &mut RefHandle<SkPathBuilder>

Appends arc to Path, after appending line if needed. Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last Path point to p1, and tangent from p1 to p2. Arc is part of circle sized to radius, positioned so it touches both tangent lines.

If last Path Point does not start arc, arc_to() appends connecting line to Path. The length of vector from p1 to p2 does not affect arc.

Arc sweep is always less than 180 degrees. If radius is zero, or if tangents are nearly parallel, arc_to() appends line from last Path Point to p1.

arc_to() appends at most one line and one conic. arc_to() implements the functionality of PostScript arct and HTML Canvas arcTo.

  • p1 Point common to pair of tangents
  • p2 end of second tangent
  • radius distance from arc to circle center
§Returns

reference to PathBuilder

pub fn arc_to_radius( &mut self, r: impl Into<Point>, x_axis_rotate: f32, large_arc: SkPathBuilder_ArcSize, sweep: SkPathDirection, xy: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

Appends arc to Path. Arc is implemented by one or more conic weighted to describe part of oval with radii (r.fX, r.fY) rotated by x_axis_rotate degrees. Arc curves from last Path Point to (xy.fX, xy.fY), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.

Arc sweep is always less than 360 degrees. arc_to_radius() appends line to xy if either radii are zero, or if last Path Point equals (xy.fX, xy.fY). arc_to_radius() scales radii r to fit last Path Point and xy if both are greater than zero but too small to describe an arc.

arc_to_radius() appends up to four conic curves. arc_to_radius() implements the functionality of SVG arc, although SVG sweep-flag value is opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while PathDirection::CW cast to int is zero.

  • r radii on axes before x-axis rotation
  • x_axis_rotate x-axis rotation in degrees; positive values are clockwise
  • large_arc chooses smaller or larger arc
  • sweep chooses clockwise or counterclockwise arc
  • xy end of arc
§Returns

reference to PathBuilder

pub fn add_arc( &mut self, oval: impl AsRef<Rect>, start_angle_deg: f32, sweep_angle_deg: f32, ) -> &mut RefHandle<SkPathBuilder>

Appends arc to the builder, as the start of new contour. Arc added is part of ellipse bounded by oval, from start_angle through sweep_angle. Both start_angle and sweep_angle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise.

If sweep_angle <= -360, or sweep_angle >= 360; and start_angle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweep_angle values are treated modulo 360, and arc may or may not draw depending on numeric rounding.

  • oval bounds of ellipse containing arc
  • start_angle_deg starting angle of arc in degrees
  • sweep_angle_deg sweep, in degrees. Positive is clockwise; treated modulo 360
§Returns

reference to this builder

pub fn add_line( &mut self, a: impl Into<Point>, b: impl Into<Point>, ) -> &mut RefHandle<SkPathBuilder>

pub fn add_rect( &mut self, rect: impl AsRef<Rect>, dir: impl Into<Option<SkPathDirection>>, start_index: impl Into<Option<usize>>, ) -> &mut RefHandle<SkPathBuilder>

Adds a new contour to the PathBuilder, defined by the rect, and wound in the specified direction. The verbs added to the path will be:

PathVerb::Move, PathVerb::Line, PathVerb::Line, PathVerb::Line, PathVerb::Close

start specifies which corner to begin the contour: 0: upper-left corner 1: upper-right corner 2: lower-right corner 3: lower-left corner

This start point also acts as the implied beginning of the subsequent, contour, if it does not have an explicit move_to(). e.g.

path.add_rect(...)
// if we don't say move_to() here, we will use the rect's start point
path.line_to(...)
  • rect Rect to add as a closed contour
  • dir PathDirection to orient the new contour
  • start_index initial corner of Rect to add
§Returns

reference to PathBuilder

pub fn add_oval( &mut self, rect: impl AsRef<Rect>, dir: impl Into<Option<SkPathDirection>>, start_index: impl Into<Option<usize>>, ) -> &mut RefHandle<SkPathBuilder>

Adds oval to PathBuilder, appending PathVerb::Move, four PathVerb::Conic, and PathVerb::Close. Oval is upright ellipse bounded by Rect oval with radii equal to half oval width and half oval height. Oval begins at (oval.right, oval.center_y()) and continues clockwise if dir is PathDirection::CW, counterclockwise if dir is PathDirection::CCW.

  • rect bounds of ellipse added
  • dir PathDirection to wind ellipse
  • start_index index of initial point of ellipse
§Returns

reference to PathBuilder

pub fn add_rrect( &mut self, rect: impl AsRef<RRect>, dir: impl Into<Option<SkPathDirection>>, start_index: impl Into<Option<usize>>, ) -> &mut RefHandle<SkPathBuilder>

Appends RRect to PathBuilder, creating a new closed contour. If dir is PathDirection::CW, RRect winds clockwise. If dir is PathDirection::CCW, RRect winds counterclockwise.

After appending, PathBuilder may be empty, or may contain: Rect, oval, or RRect.

§Returns

reference to PathBuilder

pub fn add_circle( &mut self, center: impl Into<Point>, radius: f32, dir: impl Into<Option<SkPathDirection>>, ) -> &mut RefHandle<SkPathBuilder>

Adds circle centered at (x, y) of size radius to PathBuilder, appending PathVerb::Move, four PathVerb::Conic, and PathVerb::Close. Circle begins at: (x + radius, y), continuing clockwise if dir is PathDirection::CW, and counterclockwise if dir is PathDirection::CCW.

Has no effect if radius is zero or negative.

  • center center of circle
  • radius distance from center to edge
  • dir PathDirection to wind circle
§Returns

reference to PathBuilder

pub fn add_polygon( &mut self, pts: &[Point], close: bool, ) -> &mut RefHandle<SkPathBuilder>

Adds contour created from line array, adding (pts.len() - 1) line segments. Contour added starts at pts[0], then adds a line for every additional Point in pts array. If close is true, appends PathVerb::Close to Path, connecting pts[count - 1] and pts[0].

  • pts array of line sharing end and start Point
  • close true to add line connecting contour end and start
§Returns

reference to PathBuilder

pub fn add_path( &mut self, path: &Handle<SkPath>, mode: impl Into<Option<SkPath_AddPathMode>>, ) -> &mut RefHandle<SkPathBuilder>

Appends src to PathBuilder.

If mode is path::AddPathMode::Append, src verb array, Point array, and conic weights are added unaltered. If mode is path::AddPathMode::Extend, add line before appending verbs, Point, and conic weights.

§Returns

reference to PathBuilder

pub fn add_path_with_offset( &mut self, path: &Handle<SkPath>, offset: impl Into<Point>, mode: impl Into<Option<SkPath_AddPathMode>>, ) -> &mut RefHandle<SkPathBuilder>

Appends src to PathBuilder, offset by (dx, dy).

If mode is path::AddPathMode::Append, src verb array, Point array, and conic weights are added unaltered except for the applied offset. If mode is path::AddPathMode::Extend, add line before appending verbs, Point, and conic weights.

§Returns

reference to PathBuilder

pub fn add_path_with_transform( &mut self, src: &Handle<SkPath>, matrix: &Matrix, mode: impl Into<Option<SkPath_AddPathMode>>, )

Appends src to PathBuilder, transformed by matrix. Transformed curves may have different verbs, Point, and conic weights.

If mode is path::AddPathMode::Append, src verb array, Point array, and conic weights are added unaltered. If mode is path::AddPathMode::Extend, add line before appending verbs, Point, and conic weights.

pub fn inc_reserve( &mut self, extra_pt_count: usize, extra_verb_count: usize, extra_conic_count: usize, )

Grows PathBuilder verb array and Point array to contain additional space. May improve performance and use less memory by reducing the number and size of allocations when creating PathBuilder.

  • extra_pt_count number of additional Point to allocate
  • extra_verb_count number of additional verbs
  • extra_conic_count number of additional conic weights

pub fn offset(&mut self, d: impl Into<Point>) -> &mut RefHandle<SkPathBuilder>

Offsets Point array by (dx, dy).

  • d offset added to Point array coordinates
§Returns

reference to PathBuilder

pub fn transform(&mut self, matrix: &Matrix) -> &mut RefHandle<SkPathBuilder>

Transforms verb array, Point array, and weight by matrix. transform may change verbs and increase their number.

§Returns

reference to PathBuilder

pub fn is_finite(&self) -> bool

Returns true if the builder is empty, or all of its points are finite.

pub fn toggle_inverse_fill_type(&mut self) -> &mut RefHandle<SkPathBuilder>

Replaces PathFillType with its inverse. The inverse of PathFillType describes the area unmodified by the original PathFillType.

§Returns

reference to PathBuilder

pub fn is_empty(&self) -> bool

Returns if Path is empty. Empty PathBuilder may have PathFillType but has no Point, PathVerb, or conic weight. PathBuilder::new() constructs empty PathBuilder; reset() and rewind() make Path empty.

§Returns

true if the path contains no PathVerb array

pub fn get_last_pt(&self) -> Option<Point>

Returns last point on PathBuilder. Returns None if Point array is empty.

§Returns

last Point if Point array contains one or more Point, otherwise None

pub fn set_point(&mut self, index: usize, p: impl Into<Point>)

Change the point at the specified index (see count_points()). If index is out of range, the call does nothing.

  • index which point to replace
  • p the new point value

pub fn set_last_point(&mut self, p: impl Into<Point>)

Change the last point in the builder. If the builder is empty, the call does nothing.

  • p the new point value

pub fn set_last_pt(&mut self, p: impl Into<Point>)

👎Deprecated since 0.93.0:

Use set_last_point() or set_point()

Sets the last point on the path. If Point array is empty, append PathVerb::Move to verb array and append p to Point array.

  • p last point

pub fn count_points(&self) -> usize

Returns the number of points in PathBuilder. Point count is initially zero.

§Returns

PathBuilder Point array length

pub fn is_inverse_fill_type(&self) -> bool

Returns if PathFillType describes area outside Path geometry. The inverse fill area extends indefinitely.

§Returns

true if PathFillType is PathFillType::InverseWinding or PathFillType::InverseEvenOdd

pub fn points(&self) -> &[Point]

pub fn verbs(&self) -> &[SkPathVerb]

pub fn conic_weights(&self) -> &[f32]

§

impl RefHandle<SkPathBuilder>

pub fn dump_to_string(&self, format: SkPathBuilder_DumpFormat) -> String

Dumps the path to a string using the specified format.

§Arguments
  • format - The format to use for dumping (Decimal or Hex)
§Returns

A string representation of the path

pub fn dump(&self, format: SkPathBuilder_DumpFormat)

Dumps the path to stdout using the specified format.

§Arguments
  • format - The format to use for dumping (Decimal or Hex)
§

impl RefHandle<SkPathBuilder>

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

§

impl RefHandle<GrBackendTexture>

pub fn dimensions(&self) -> ISize

The dimensions of the texture in pixels.

pub fn width(&self) -> i32

The width of the texture in pixels.

pub fn height(&self) -> i32

The height of the texture in pixels.

pub fn label(&self) -> &str

The optional label assigned to this texture.

pub fn mipmapped(&self) -> skgpu_Mipmapped

Whether the texture is mipmapped.

pub fn has_mipmaps(&self) -> bool

Returns true if the texture is mipmapped.

pub fn backend(&self) -> GrBackendApi

The crate::gpu::ganesh::BackendApi this texture is used with.

pub fn gl_texture_info(&self) -> Option<TextureInfo>

The GL texture info, or None if this texture is not GL.

pub fn gl_texture_parameters_modified(&mut self)

Marks that the client has modified the GL texture parameters and Skia should re-read them.

pub fn backend_format(&self) -> Handle<GrBackendFormat>

Get the BackendFormat for this texture (or an invalid format if this is not valid).

pub fn set_mutable_state(&mut self, state: &RCHandle<skgpu_MutableTextureState>)

If the client changes any of the mutable state of the BackendTexture they should call this function to inform Skia that those values have changed. The backend API specific state that can be set from this function are:

Vulkan: VkImageLayout and QueueFamilyIndex

pub fn is_protected(&self) -> bool

Returns true if we are working with protected content.

pub fn is_same_texture(&mut self, texture: &RefHandle<GrBackendTexture>) -> bool

Returns true if both textures are valid and refer to the same API texture.

§

impl RefHandle<GrYUVABackendTextures>

pub fn new( info: &Handle<SkYUVAInfo>, textures: &[RefHandle<GrBackendTexture>], texture_origin: GrSurfaceOrigin, ) -> Option<RefHandle<GrYUVABackendTextures>>

Initializes a set of BackendTextures that can store the planes indicated by the YUVAInfo. The texture dimensions must match the YUVAInfo’s plane dimensions. All the textures share a common origin. Returns None if the number of textures does not match the number of planes or the resulting set is not valid.

  • info the YUVAInfo describing the planar image
  • textures one BackendTexture per plane, in plane order
  • texture_origin the origin that all textures share

pub fn textures(&self) -> Vec<RefHandle<GrBackendTexture>>

Copies of all the plane textures, in plane order.

pub fn texture(&self, i: usize) -> Option<RefHandle<GrBackendTexture>>

A copy of the ith plane texture, or None if i is out of range.

pub fn yuva_info(&self) -> &Handle<SkYUVAInfo>

The YUVAInfo describing the planar layout.

pub fn num_planes(&self) -> usize

The number of planes.

pub fn texture_origin(&self) -> GrSurfaceOrigin

The origin that all the textures share.

§

impl RefHandle<skia_textlayout_Paragraph>

pub fn max_width(&self) -> f32

pub fn height(&self) -> f32

pub fn min_intrinsic_width(&self) -> f32

pub fn max_intrinsic_width(&self) -> f32

pub fn alphabetic_baseline(&self) -> f32

pub fn ideographic_baseline(&self) -> f32

pub fn longest_line(&self) -> f32

pub fn did_exceed_max_lines(&self) -> bool

pub fn layout(&mut self, width: f32)

pub fn paint(&self, canvas: &Canvas, p: impl Into<Point>)

pub fn get_rects_for_range( &self, range: Range<usize>, rect_height_style: RectHeightStyle, rect_width_style: RectWidthStyle, ) -> Vec<TextBox>

Returns a vector of bounding boxes that enclose all text between start and end glyph indexes, including start and excluding end

pub fn get_rects_for_placeholders(&self) -> Vec<TextBox>

Returns boxes for visible placeholders in the order they were added to the builder, regardless of their visual order after bidirectional text layout.

pub fn get_glyph_position_at_coordinate( &self, p: impl Into<Point>, ) -> skia_textlayout_PositionWithAffinity

Returns the index of the glyph that corresponds to the provided coordinate, with the top left corner as the origin, and +y direction as down

pub fn get_word_boundary(&self, offset: u32) -> Range<usize> ⓘ

Finds the first and last glyphs that define a word containing the glyph at index offset

pub fn get_line_metrics(&self) -> Vec<LineMetrics<'_>>

pub fn line_number(&self) -> usize

pub fn mark_dirty(&mut self)

pub fn unresolved_glyphs(&mut self) -> Option<usize>

This function will return the number of unresolved glyphs or None if not applicable (has not been shaped yet - valid case)

pub fn unresolved_codepoints(&mut self) -> Vec<i32>

pub fn visit<'a, F>(&mut self, visitor: F)
where F: FnMut(usize, Option<&'a Handle<skia_textlayout_Paragraph_VisitorInfo>>),

pub fn extended_visit<'a, F>(&mut self, visitor: F)
where F: FnMut(usize, Option<&'a Handle<skia_textlayout_Paragraph_ExtendedVisitorInfo>>),

pub fn get_path_at(&mut self, line_number: usize) -> (usize, Handle<SkPath>)

Returns path for a given line

  • line_number - a line number
  • dest - a resulting path

Returns: a number glyphs that could not be converted to path

pub fn get_path(text_blob: &mut RCHandle<SkTextBlob>) -> Handle<SkPath>

Returns path for a text blob

  • text_blob - a text blob

Returns: a path

pub fn contains_emoji(&mut self, text_blob: &mut RCHandle<SkTextBlob>) -> bool

Checks if a given text blob contains glyph with emoji

  • text_blob - a text blob

Returns: true if there is such a glyph

pub fn contains_color_font_or_bitmap( &mut self, text_blob: &mut RCHandle<SkTextBlob>, ) -> bool

Checks if a given text blob contains colored font or bitmap

  • text_blob - a text blob

Returns: true if there is such a glyph

pub fn get_line_number_at(&self, code_unit_index: usize) -> Option<usize>

Finds the line number of the line that contains the given UTF-8 index.

  • index - a UTF-8 TextIndex into the paragraph

Returns: the line number the glyph that corresponds to the given code_unit_index is in, or -1 if the code_unit_index is out of bounds, or when the glyph is truncated or ellipsized away.

pub fn get_line_number_at_utf16_offset( &self, code_unit_index: usize, ) -> Option<usize>

Finds the line number of the line that contains the given UTF-16 index.

  • index - a UTF-16 offset into the paragraph

Returns: the line number the glyph that corresponds to the given code_unit_index is in, or -1 if the code_unit_index is out of bounds, or when the glyph is truncated or ellipsized away.

pub fn get_line_metrics_at(&self, line_number: usize) -> Option<LineMetrics<'_>>

Returns line metrics info for the line

  • line_number - a line number
  • line_metrics - an address to return the info (in case of null just skipped)

Returns: true if the line is found; false if not

pub fn get_actual_text_range( &self, line_number: usize, include_spaces: bool, ) -> Range<usize> ⓘ

Returns the visible text on the line (excluding a possible ellipsis)

  • line_number - a line number
  • include_spaces - indicates if the whitespaces should be included

Returns: the range of the text that is shown in the line

pub fn get_glyph_cluster_at( &self, code_unit_index: usize, ) -> Option<GlyphClusterInfo>

Finds a glyph cluster for text index

  • code_unit_index - a text index
  • glyph_info - a glyph cluster info filled if not null

Returns: true if glyph cluster was found; false if not

pub fn get_closest_glyph_cluster_at( &self, d: impl Into<Point>, ) -> Option<GlyphClusterInfo>

Finds the closest glyph cluster for a visual text position

  • dx - x coordinate
  • dy - y coordinate
  • glyph_info - a glyph cluster info filled if not null

Returns: true if glyph cluster was found; false if not (which usually means the paragraph is empty)

pub fn get_glyph_info_at_utf16_offset( &mut self, code_unit_index: usize, ) -> Option<GlyphInfo>

Retrieves the information associated with the glyph located at the given code_unit_index.

  • code_unit_index - a UTF-16 offset into the paragraph
  • glyph_info - an optional GlyphInfo struct to hold the information associated with the glyph found at the given index

Returns: false only if the offset is out of bounds

pub fn get_closest_utf16_glyph_info_at( &mut self, d: impl Into<Point>, ) -> Option<GlyphInfo>

Finds the information associated with the closest glyph to the given paragraph coordinates.

  • d - x/y coordinate
  • glyph_info - an optional GlyphInfo struct to hold the information associated with the glyph found. The text indices and text ranges are described using UTF-16 offsets

Returns: true if a grapheme cluster was found; false if not (which usually means the paragraph is empty)

pub fn get_font_at(&self, code_unit_index: usize) -> Handle<SkFont>

Returns the font that is used to shape the text at the position

  • code_unit_index - text index

Returns: font info or an empty font info if the text is not found

pub fn get_font_at_utf16_offset( &mut self, code_unit_index: usize, ) -> Handle<SkFont>

Returns the font used to shape the text at the given UTF-16 offset.

  • code_unit_index - a UTF-16 offset in the paragraph

Returns: font info or an empty font info if the text is not found

pub fn get_fonts(&self) -> Vec<FontInfo>

Returns the information about all the fonts used to shape the paragraph text

Returns: a list of fonts and text ranges

§

impl RefHandle<skia_textlayout_ParagraphBuilder>

pub fn push_style( &mut self, style: &Handle<skia_textlayout_TextStyle>, ) -> &mut RefHandle<skia_textlayout_ParagraphBuilder>

pub fn pop(&mut self) -> &mut RefHandle<skia_textlayout_ParagraphBuilder>

pub fn peek_style(&mut self) -> Handle<skia_textlayout_TextStyle>

pub fn add_text( &mut self, str: impl AsRef<str>, ) -> &mut RefHandle<skia_textlayout_ParagraphBuilder>

pub fn add_placeholder( &mut self, placeholder_style: &PlaceholderStyle, ) -> &mut RefHandle<skia_textlayout_ParagraphBuilder>

pub fn build(&mut self) -> RefHandle<skia_textlayout_Paragraph>

pub fn get_text(&mut self) -> &str

pub fn get_paragraph_style(&self) -> RefHandle<skia_textlayout_ParagraphStyle>

pub fn reset(&mut self)

pub fn new( style: &RefHandle<skia_textlayout_ParagraphStyle>, font_collection: impl Into<RCHandle<skia_textlayout_FontCollection>>, ) -> RefHandle<skia_textlayout_ParagraphBuilder>

§

impl RefHandle<skia_textlayout_ParagraphStyle>

pub fn new() -> RefHandle<skia_textlayout_ParagraphStyle>

pub fn strut_style(&self) -> &Handle<skia_textlayout_StrutStyle>

pub fn set_strut_style( &mut self, strut_style: Handle<skia_textlayout_StrutStyle>, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn text_style(&self) -> &Handle<skia_textlayout_TextStyle>

pub fn set_text_style( &mut self, text_style: &Handle<skia_textlayout_TextStyle>, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn text_direction(&self) -> skia_textlayout_TextDirection

pub fn set_text_direction( &mut self, direction: skia_textlayout_TextDirection, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn text_align(&self) -> skia_textlayout_TextAlign

pub fn set_text_align( &mut self, align: skia_textlayout_TextAlign, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn max_lines(&self) -> Option<usize>

pub fn set_max_lines( &mut self, lines: impl Into<Option<usize>>, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn ellipsis(&self) -> &str

pub fn set_ellipsis( &mut self, ellipsis: impl AsRef<str>, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn height(&self) -> f32

pub fn set_height( &mut self, height: f32, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn text_height_behavior(&self) -> skia_textlayout_TextHeightBehavior

pub fn set_text_height_behavior( &mut self, v: skia_textlayout_TextHeightBehavior, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn unlimited_lines(&self) -> bool

pub fn ellipsized(&self) -> bool

pub fn effective_align(&self) -> skia_textlayout_TextAlign

pub fn hinting_is_on(&self) -> bool

pub fn turn_hinting_off( &mut self, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn fake_missing_font_styles(&self) -> bool

pub fn set_fake_missing_font_styles( &mut self, value: bool, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn replace_tab_characters(&self) -> bool

pub fn set_replace_tab_characters( &mut self, value: bool, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn apply_rounding_hack(&self) -> bool

pub fn set_apply_rounding_hack( &mut self, value: bool, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn letter_spacing_by_css_spec(&self) -> bool

pub fn set_letter_spacing_by_css_spec( &mut self, value: bool, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

pub fn render_soft_hyphens(&self) -> bool

pub fn set_render_soft_hyphens( &mut self, value: bool, ) -> &mut RefHandle<skia_textlayout_ParagraphStyle>

§

impl RefHandle<SkShaper>

pub fn new_primitive() -> RefHandle<SkShaper>

👎Deprecated since 0.74.0:

use shapers::primitive::primitive_text()

pub fn new_shaper_driven_wrapper( fallback_font_mgr: impl Into<Option<RCHandle<SkFontMgr>>>, ) -> Option<RefHandle<SkShaper>>

pub fn new_shape_then_wrap( fallback_font_mgr: impl Into<Option<RCHandle<SkFontMgr>>>, ) -> Option<RefHandle<SkShaper>>

pub fn new_shape_dont_wrap_or_reorder( fallback_font_mgr: impl Into<Option<RCHandle<SkFontMgr>>>, ) -> Option<RefHandle<SkShaper>>

👎Deprecated since 0.74.0:

use shapers::hb::shape_dont_wrap_or_reorder()

pub fn purge_harf_buzz_cache()

pub fn new( font_mgr: impl Into<Option<RCHandle<SkFontMgr>>>, ) -> RefHandle<SkShaper>

pub fn purge_caches()

§

impl RefHandle<SkShaper_FontRunIterator>

pub fn current_font(&self) -> &Handle<SkFont>

§

impl RefHandle<SkShaper>

pub fn new_font_mgr_run_iterator<'a>( utf8: &'a str, font: &Handle<SkFont>, fallback: impl Into<Option<RCHandle<SkFontMgr>>>, ) -> Borrows<'a, RefHandle<SkShaper_FontRunIterator>>

pub fn new_trivial_font_run_iterator( font: &Handle<SkFont>, utf8_bytes: usize, ) -> RefHandle<SkShaper_FontRunIterator>

§

impl RefHandle<SkShaper_BiDiRunIterator>

pub fn current_level(&self) -> u8

The unicode bidi embedding level (even ltr, odd rtl).

§

impl RefHandle<SkShaper>

pub fn new_bidi_run_iterator( utf8: &str, bidi_level: u8, ) -> Option<Borrows<'_, RefHandle<SkShaper_BiDiRunIterator>>>

pub fn new_icu_bidi_run_iterator( utf8: &str, level: u8, ) -> Option<Borrows<'_, RefHandle<SkShaper_BiDiRunIterator>>>

pub fn new_trivial_bidi_run_iterator( bidi_level: u8, utf8_bytes: usize, ) -> RefHandle<SkShaper_BiDiRunIterator>

👎Deprecated since 0.74.0:

use shapers::primitive::trivial_bidi_run_iterator()

§

impl RefHandle<SkShaper_ScriptRunIterator>

pub fn current_script(&self) -> FourByteTag

Should be ISO 15924 codes.

§

impl RefHandle<SkShaper>

pub fn new_script_run_iterator( utf8: &str, script: FourByteTag, ) -> Borrows<'_, RefHandle<SkShaper_ScriptRunIterator>>

pub fn new_hb_icu_script_run_iterator( utf8: &str, ) -> Borrows<'_, RefHandle<SkShaper_ScriptRunIterator>>

pub fn new_trivial_script_run_iterator( bidi_level: u8, utf8_bytes: usize, ) -> RefHandle<SkShaper_ScriptRunIterator>

👎Deprecated since 0.74.0:

use shapers::primitive::trivial_script_run_iterator

§

impl RefHandle<SkShaper_LanguageRunIterator>

pub fn current_language(&self) -> &CStr

Should be BCP-47; C locale names may also work.

§

impl RefHandle<SkShaper>

pub fn new_std_language_run_iterator( utf8: &str, ) -> Option<RefHandle<SkShaper_LanguageRunIterator>>

pub fn new_trivial_language_run_iterator( language: impl AsRef<str>, utf8_bytes: usize, ) -> RefHandle<SkShaper_LanguageRunIterator>

§

impl RefHandle<SkShaper>

pub fn shape<'a, 'b>( &self, utf8: &str, font: &Handle<SkFont>, left_to_right: bool, width: f32, run_handler: &'b mut impl AsRunHandler<'a>, )
where 'b: 'a,

pub fn shape_with_iterators<'a, 'b>( &self, utf8: &str, font_run_iterator: &mut RefHandle<SkShaper_FontRunIterator>, bidi_run_iterator: &mut RefHandle<SkShaper_BiDiRunIterator>, script_run_iterator: &mut RefHandle<SkShaper_ScriptRunIterator>, language_run_iterator: &mut RefHandle<SkShaper_LanguageRunIterator>, width: f32, run_handler: &'b mut impl AsRunHandler<'a>, )
where 'b: 'a,

pub fn shape_with_iterators_and_features<'a, 'b>( &self, utf8: &str, font_run_iterator: &mut RefHandle<SkShaper_FontRunIterator>, bidi_run_iterator: &mut RefHandle<SkShaper_BiDiRunIterator>, script_run_iterator: &mut RefHandle<SkShaper_ScriptRunIterator>, language_run_iterator: &mut RefHandle<SkShaper_LanguageRunIterator>, features: &[SkShaper_Feature], width: f32, run_handler: &'b mut impl AsRunHandler<'a>, )
where 'b: 'a,

pub fn shape_with_iterators_and_features_and_options<'a, 'b>( &self, utf8: &str, font_run_iterator: &mut RefHandle<SkShaper_FontRunIterator>, bidi_run_iterator: &mut RefHandle<SkShaper_BiDiRunIterator>, script_run_iterator: &mut RefHandle<SkShaper_ScriptRunIterator>, language_run_iterator: &mut RefHandle<SkShaper_LanguageRunIterator>, features: &[SkShaper_Feature], width: f32, tracking: f32, run_handler: &'b mut impl AsRunHandler<'a>, )
where 'b: 'a,

Shapes text using the new SkShaper::Options-based API, which supports glyph tracking (letter spacing) in addition to the width available for horizontal layout.

§

impl RefHandle<SkShaper>

pub fn shape_text_blob( &self, text: &str, font: &Handle<SkFont>, left_to_right: bool, width: f32, offset: impl Into<Point>, ) -> Option<(RCHandle<SkTextBlob>, Point)>

Trait Implementations§

§

impl Clone for RefHandle<SkMesh>

§

fn clone(&self) -> RefHandle<SkMesh>

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
§

impl Clone for RefHandle<SkPathBuilder>

§

fn clone(&self) -> RefHandle<SkPathBuilder>

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
§

impl Clone for RefHandle<GrBackendTexture>

§

fn clone(&self) -> RefHandle<GrBackendTexture>

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
§

impl Clone for RefHandle<skia_textlayout_ParagraphStyle>

§

fn clone(&self) -> RefHandle<skia_textlayout_ParagraphStyle>

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
§

impl Debug for RefHandle<SkContext>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkDrawable_GpuDrawHandler>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkImage_AsyncReadResult>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkImageGenerator>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkMesh>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkPathBuilder>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkTypeface_LocalizedStrings>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<GrBackendTexture>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<GrYUVABackendTextures>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<skia_textlayout_Paragraph>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<skia_textlayout_ParagraphBuilder>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<skia_textlayout_ParagraphStyle>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkShaper>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkShaper_FontRunIterator>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkShaper_BiDiRunIterator>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkShaper_ScriptRunIterator>

§

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

Formats the value using the given formatter. Read more
§

impl Debug for RefHandle<SkShaper_LanguageRunIterator>

§

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

Formats the value using the given formatter. Read more
§

impl Default for RefHandle<SkPathBuilder>

§

fn default() -> RefHandle<SkPathBuilder>

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

impl Default for RefHandle<skia_textlayout_ParagraphStyle>

§

fn default() -> RefHandle<skia_textlayout_ParagraphStyle>

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

impl Default for RefHandle<SkShaper>

§

fn default() -> RefHandle<SkShaper>

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

impl<N> Drop for RefHandle<N>
where N: NativeDelete,

§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
§

impl From<RefHandle<SkPathBuilder>> for Handle<SkPath>

§

fn from(value: RefHandle<SkPathBuilder>) -> Handle<SkPath>

Converts to this type from the input type.
§

impl Iterator for RefHandle<SkTypeface_LocalizedStrings>

§

fn next( &mut self, ) -> Option<<RefHandle<SkTypeface_LocalizedStrings> as Iterator>::Item>

Returns the next localized family-name entry.

§

type Item = LocalizedString

The type of the elements being iterated over.
Source§

fn next_chunk<const N: usize>( &mut self, ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 (const: unstable) · Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 (const: unstable) · Source§

fn count(self) -> usize
where Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 (const: unstable) · Source§

fn last(self) -> Option<Self::Item>
where Self: Sized,

Consumes the iterator, returning the last element. Read more
Source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 (const: unstable) · Source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 (const: unstable) · Source§

fn step_by(self, step: usize) -> StepBy<Self> ⓘ
where Self: Sized,

Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
1.0.0 (const: unstable) · Source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> ⓘ
where Self: Sized, U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 (const: unstable) · Source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> ⓘ
where Self: Sized, U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
Source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self> ⓘ
where Self: Sized, Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between items of the original iterator. Read more
Source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> ⓘ
where Self: Sized, G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator between items of the original iterator. Read more
1.0.0 (const: unstable) · Source§

fn map<B, F>(self, f: F) -> Map<Self, F> ⓘ
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.21.0 (const: unstable) · Source§

fn for_each<F>(self, f: F)
where Self: Sized, F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 (const: unstable) · Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P> ⓘ
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element should be yielded. Read more
1.0.0 (const: unstable) · Source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> ⓘ
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 (const: unstable) · Source§

fn enumerate(self) -> Enumerate<Self> ⓘ
where Self: Sized,

Creates an iterator which gives the current iteration count as well as the next value. Read more
1.0.0 (const: unstable) · Source§

fn peekable(self) -> Peekable<Self> ⓘ
where Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Read more
1.0.0 (const: unstable) · Source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> ⓘ
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 (const: unstable) · Source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> ⓘ
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 (const: unstable) · Source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> ⓘ
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 (const: unstable) · Source§

fn skip(self, n: usize) -> Skip<Self> ⓘ
where Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 (const: unstable) · Source§

fn take(self, n: usize) -> Take<Self> ⓘ
where Self: Sized,

Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. Read more
1.0.0 (const: unstable) · Source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> ⓘ
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but unlike fold, produces a new iterator. Read more
1.0.0 (const: unstable) · Source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> ⓘ
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.29.0 (const: unstable) · Source§

fn flatten(self) -> Flatten<Self> ⓘ
where Self: Sized, Self::Item: IntoIterator,

Creates an iterator that flattens nested structure. Read more
Source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N> ⓘ
where Self: Sized, F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), the windows during mapping overlap as well. Read more
1.0.0 (const: unstable) · Source§

fn fuse(self) -> Fuse<Self> ⓘ
where Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 (const: unstable) · Source§

fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
where Self: Sized, F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 (const: unstable) · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Iterator. Read more
1.0.0 (const: unstable) · Source§

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, Self: Sized,

Transforms an iterator into a collection. Read more
Source§

fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
where Self: Sized, Self::Item: Try, <Self::Item as Try>::Residual: Residual<B>, B: FromIterator<<Self::Item as Try>::Output>,

🔬This is a nightly-only experimental API. (iterator_try_collect)
Fallibly transforms an iterator into a collection, short circuiting if a failure is encountered. Read more
Source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 (const: unstable) · Source§

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
Source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where T: 'a, Self: Sized + DoubleEndedIterator<Item = &'a mut T>, P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. Returns the number of true elements found. Read more
Source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, such that all those that return true precede all those that return false. Read more
1.27.0 (const: unstable) · Source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
1.27.0 (const: unstable) · Source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error. Read more
1.0.0 (const: unstable) · Source§

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, returning the final result. Read more
1.51.0 (const: unstable) · Source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing operation. Read more
Source§

fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, R: Try<Output = Self::Item>, <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 (const: unstable) · Source§

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 (const: unstable) · Source§

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 (const: unstable) · Source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 (const: unstable) · Source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns the first non-none result. Read more
Source§

fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, R: Try<Output = bool>, <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns the first true result or the first error. Read more
1.0.0 (const: unstable) · Source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 (const: unstable) · Source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where P: FnMut(Self::Item) -> bool, Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its index. Read more
1.0.0 (const: unstable) · Source§

fn max(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 (const: unstable) · Source§

fn min(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 (const: unstable) · Source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the specified function. Read more
1.15.0 (const: unstable) · Source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function. Read more
1.6.0 (const: unstable) · Source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the specified function. Read more
1.15.0 (const: unstable) · Source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function. Read more
1.0.0 (const: unstable) · Source§

fn rev(self) -> Rev<Self> ⓘ
where Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 (const: unstable) · Source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 (const: unstable) · Source§

fn copied<'a, T>(self) -> Copied<Self> ⓘ
where T: Copy + 'a, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 (const: unstable) · Source§

fn cloned<'a, T>(self) -> Cloned<Self> ⓘ
where T: Clone + 'a, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 (const: unstable) · Source§

fn cycle(self) -> Cycle<Self> ⓘ
where Self: Sized + Clone,

Repeats an iterator endlessly. Read more
Source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N> ⓘ
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 (const: unstable) · Source§

fn sum<S>(self) -> S
where Self: Sized, S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 (const: unstable) · Source§

fn product<P>(self) -> P
where Self: Sized, P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements. Read more
1.5.0 (const: unstable) · Source§

fn cmp<I>(self, other: I) -> Ordering
where I: IntoIterator<Item = Self::Item>, Self::Item: Ord, Self: Sized,

Lexicographically compares the elements of this Iterator with those of another. Read more
Source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 (const: unstable) · Source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. As soon as an order can be determined, the evaluation stops and a result is returned. Read more
Source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 (const: unstable) · Source§

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are equal to those of another. Read more
Source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of another with respect to the specified equality function. Read more
1.5.0 (const: unstable) · Source§

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are not equal to those of another. Read more
1.5.0 (const: unstable) · Source§

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less than those of another. Read more
1.5.0 (const: unstable) · Source§

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less or equal to those of another. Read more
1.5.0 (const: unstable) · Source§

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than those of another. Read more
1.5.0 (const: unstable) · Source§

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than or equal to those of another. Read more
1.82.0 (const: unstable) · Source§

fn is_sorted(self) -> bool
where Self: Sized, Self::Item: PartialOrd,

Checks if the elements of this iterator are sorted. Read more
1.82.0 (const: unstable) · Source§

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> bool,

Checks if the elements of this iterator are sorted using the given comparator function. Read more
1.82.0 (const: unstable) · Source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, K: PartialOrd,

Checks if the elements of this iterator are sorted using the given key extraction function. Read more
§

impl<N> PartialEq for RefHandle<N>
where N: NativeDelete + NativePartialEq,

§

fn eq(&self, rhs: &RefHandle<N>) -> bool

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

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

Inequality operator !=. Read more
§

impl<N> PointerWrapper<N> for RefHandle<N>
where N: NativeDelete,

§

fn wrap(ptr: *mut N) -> Option<RefHandle<N>>

Wraps a native pointer into a wrapper type. Returns None if the pointer is null.
§

fn unwrap(self) -> *mut N

Unwraps the wrapper type into the native pointer.
§

fn inner(&self) -> &N

Access the wrapped pointer.
§

fn inner_mut(&mut self) -> &mut N

Access the wrapped pointer. Read more
§

impl<T> RunIterator for RefHandle<T>
where T: NativeDelete + NativeBase<SkShaper_RunIterator>,

§

fn consume(&mut self)

Set state to that of current run and move iterator to end of that run.
§

fn end_of_current_run(&self) -> usize

Offset to one past the last (utf8) element in the current run.
§

fn at_end(&self) -> bool

Return true if RunIterator::consume() should no longer be called.
§

impl Send for RefHandle<SkImage_AsyncReadResult>

§

impl Send for RefHandle<SkImageGenerator>

§

impl Send for RefHandle<SkPathBuilder>

§

impl Send for RefHandle<GrBackendTexture>

§

impl Send for RefHandle<GrYUVABackendTextures>

§

impl Send for RefHandle<skia_textlayout_ParagraphBuilder>

§

impl Send for RefHandle<skia_textlayout_ParagraphStyle>

§

impl Send for RefHandle<SkShaper>

§

impl Sync for RefHandle<SkImage_AsyncReadResult>

§

impl Sync for RefHandle<SkImageGenerator>

§

impl Sync for RefHandle<SkPathBuilder>

§

impl Sync for RefHandle<GrBackendTexture>

§

impl Sync for RefHandle<GrYUVABackendTextures>

§

impl Sync for RefHandle<skia_textlayout_ParagraphBuilder>

§

impl Sync for RefHandle<skia_textlayout_ParagraphStyle>

§

impl Sync for RefHandle<SkShaper>

Auto Trait Implementations§

§

impl<N> !Send for RefHandle<N>

§

impl<N> !Sync for RefHandle<N>

§

impl<N> Freeze for RefHandle<N>

§

impl<N> RefUnwindSafe for RefHandle<N>
where N: RefUnwindSafe,

§

impl<N> Unpin for RefHandle<N>

§

impl<N> UnsafeUnpin for RefHandle<N>

§

impl<N> UnwindSafe for RefHandle<N>
where N: RefUnwindSafe,

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
§

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,

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 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 + Send + Sync> ⓘ

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<I> IntoIterator for I
where I: Iterator,

Source§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

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

§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

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

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