Skip to main content

Image

Struct Image 

Source
pub struct Image { /* private fields */ }
Expand description

Dense pixels with explicit axis-order and channel-order semantics.

Image composes a Matrix instead of erasing its numeric dtype and storage behavior. Construction validates all metadata once; the matrix is thereafter exposed immutably so the image contract cannot be invalidated.

Implementations§

Source§

impl Image

Source

pub fn new( data: Matrix, layout: ImageLayout, format: ImageFormat, ) -> Result<Self>

Attach checked image semantics to a dense matrix.

Zero-sized dimensions are legal. They remain useful for shape propagation and carry no special allocation promise beyond the backing matrix contract.

§Errors

Returns an error when the matrix rank does not match layout, the channel axis does not match format, or an Hw image is assigned a non-gray format.

Source

pub const fn as_matrix(&self) -> &Matrix

Borrow the backing dense matrix without copying storage.

Source

pub fn into_matrix(self) -> Matrix

Remove image semantics and return the backing matrix.

Source

pub fn width(&self) -> usize

Return the image width.

Source

pub fn height(&self) -> usize

Return the image height.

Source

pub const fn channels(&self) -> usize

Return the number of logical channels.

Source

pub fn batch_size(&self) -> usize

Return the batch extent, or one for an unbatched layout.

Source

pub const fn layout(&self) -> ImageLayout

Return the image axis order.

Source

pub const fn format(&self) -> ImageFormat

Return the logical channel order.

Source

pub const fn dtype(&self) -> DType

Return the scalar representation of the backing matrix.

Source§

impl Image

Source

pub fn resize( &self, target_width: u32, target_height: u32, interpolation: InterpolationMode, ) -> Result<Self>

Resize an FP32 channel-first image while preserving its layout and format.

Delegates to crate::image::resize.

Source

pub fn crop(&self, x: u32, y: u32, width: u32, height: u32) -> Result<Self>

Extract a region, clipping its right and bottom edges to the source extent.

Delegates to crate::image::crop.

Source

pub fn flip(&self, horizontal: bool, vertical: bool) -> Result<Self>

Flip an image horizontally, vertically, or along both axes.

Delegates to crate::image::flip.

Source

pub fn rotate(&self, degrees: u32) -> Result<Self>

Rotate clockwise by a multiple of 90 degrees.

Delegates to crate::image::rotate.

Source

pub fn pad( &self, left: u32, right: u32, top: u32, bottom: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Add asymmetric padding with an explicit border policy.

Delegates to crate::image::pad.

Source

pub fn center_crop(&self, width: u32, height: u32) -> Result<Self>

Extract a centered region with the requested exact extent.

Delegates to crate::image::center_crop.

Source

pub fn remap( &self, map: &Matrix, interpolation: InterpolationMode, border: BorderMode, border_value: f32, ) -> Result<Self>

Resample an image from an FP32 absolute-coordinate map shaped

Delegates to crate::image::remap.

Source

pub fn warp_affine( &self, transform: &Matrix, width: u32, height: u32, interpolation: InterpolationMode, border: BorderMode, border_value: f32, ) -> Result<Self>

Apply an inverse FP32 2x3 affine transform to an image.

Delegates to crate::image::warp_affine.

Source

pub fn warp_perspective( &self, transform: &Matrix, width: u32, height: u32, interpolation: InterpolationMode, border: BorderMode, border_value: f32, ) -> Result<Self>

Apply an inverse FP32 3x3 perspective transform to an image.

Delegates to crate::image::warp_perspective.

Source

pub fn threshold_binary(&self, threshold: f32, max_value: f32) -> Result<Self>

Replace values above threshold with max_value and all others with zero.

Delegates to crate::image::threshold_binary.

Source

pub fn threshold_binary_inv( &self, threshold: f32, max_value: f32, ) -> Result<Self>

Replace values at or below threshold with max_value and all others with zero.

Delegates to crate::image::threshold_binary_inv.

Source

pub fn threshold_truncate(&self, threshold: f32) -> Result<Self>

Truncate values above threshold.

Delegates to crate::image::threshold_truncate.

Source

pub fn threshold_to_zero(&self, threshold: f32) -> Result<Self>

Replace values at or below threshold with zero.

Delegates to crate::image::threshold_to_zero.

Source

pub fn threshold_to_zero_inv(&self, threshold: f32) -> Result<Self>

Replace values above threshold with zero.

Delegates to crate::image::threshold_to_zero_inv.

Source

pub fn in_range(&self, low: f32, high: f32, true_value: f32) -> Result<Self>

Produce true_value for values inside the inclusive interval and zero outside it.

Delegates to crate::image::in_range.

Source

pub fn clamp(&self, low: f32, high: f32) -> Result<Self>

Clamp every pixel to the inclusive interval.

Delegates to crate::image::clamp.

Source

pub fn invert(&self, max_value: f32) -> Result<Self>

Invert every value around max_value.

Delegates to crate::image::invert.

Source

pub fn brightness_contrast( &self, brightness: f32, contrast: f32, ) -> Result<Self>

Apply value * contrast + brightness.

Delegates to crate::image::brightness_contrast.

Source

pub fn gamma_contrast(&self, gamma: f32, gain: f32) -> Result<Self>

Apply max(value, 0)^gamma * gain.

Delegates to crate::image::gamma_contrast.

Source

pub fn solarize(&self, threshold: f32, max_value: f32) -> Result<Self>

Invert values at or above threshold around max_value.

Delegates to crate::image::solarize.

Source

pub fn posterize(&self, levels: u32, low: f32, high: f32) -> Result<Self>

Quantize [low, high] to levels evenly spaced values using round-half-up.

Delegates to crate::image::posterize.

Source

pub fn grayscale(&self) -> Result<Self>

Convert an RGB or RGBA image to Rec.709 grayscale.

Delegates to crate::image::grayscale.

Source

pub fn alpha_blend(&self, right: &Image, alpha: f32) -> Result<Self>

Blend two equal semantic images using left * (1-alpha) + right * alpha.

Delegates to crate::image::alpha_blend.

Source

pub fn composite(&self, right: &Image, mask: &Image) -> Result<Self>

Composite two equal images with a clamped Gray or per-channel mask.

Delegates to crate::image::composite.

Source

pub fn erase( &self, x: u32, y: u32, width: u32, height: u32, value: f32, ) -> Result<Self>

Fill the intersection of a rectangle and the image with one finite value.

Delegates to crate::image::erase.

Source

pub fn color_twist(&self, transform: &Matrix) -> Result<Self>

Apply one shared FP32 [3, 4] affine color transform to RGB channels.

Delegates to crate::image::color_twist.

Source

pub fn channel_reorder( &self, order: [u32; 4], output_format: ImageFormat, ) -> Result<Self>

Reorder one to four channels and explicitly assign the resulting format.

Delegates to crate::image::channel_reorder.

Source

pub fn gaussian_noise(&self, mean: f32, stddev: f32, seed: u64) -> Result<Self>

Add explicit-seed Philox Gaussian noise to every pixel.

Delegates to crate::image::gaussian_noise.

Source

pub fn salt_pepper_noise( &self, probability: f32, salt_value: f32, pepper_value: f32, seed: u64, ) -> Result<Self>

Replace a seeded fraction of pixels with salt or pepper values.

Delegates to crate::image::salt_pepper_noise.

Source

pub fn convolve_2d( &self, kernel: &Matrix, border: BorderMode, border_value: f32, ) -> Result<Self>

Apply same-shape 2D cross-correlation with an odd FP32 kernel up to 31×31.

Delegates to crate::image::convolve_2d.

Source

pub fn separable_convolve_2d( &self, kernel_x: &Matrix, kernel_y: &Matrix, border: BorderMode, border_value: f32, ) -> Result<Self>

Apply horizontal and vertical odd FP32 vector kernels up to length 31.

Delegates to crate::image::separable_convolve_2d.

Source

pub fn average_blur( &self, width: u32, height: u32, border: BorderMode, ) -> Result<Self>

Average an odd rectangular neighborhood up to 31×31.

Delegates to crate::image::average_blur.

Source

pub fn sobel(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self>

Compute one first-order Sobel derivative.

Delegates to crate::image::sobel.

Source

pub fn scharr(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self>

Compute one first-order Scharr derivative.

Delegates to crate::image::scharr.

Source

pub fn laplacian(&self, border: BorderMode) -> Result<Self>

Apply the four-neighbor discrete Laplacian.

Delegates to crate::image::laplacian.

Source

pub fn erode( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Erode with an odd rectangular structuring element up to 31×31.

Delegates to crate::image::erode.

Source

pub fn dilate( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Dilate with an odd rectangular structuring element up to 31×31.

Delegates to crate::image::dilate.

Source

pub fn morphology_open( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Erode and then dilate with the same rectangular element.

Delegates to crate::image::morphology_open.

Source

pub fn morphology_close( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Dilate and then erode with the same rectangular element.

Delegates to crate::image::morphology_close.

Source

pub fn morphology_gradient( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Return dilation minus erosion.

Delegates to crate::image::morphology_gradient.

Source

pub fn gaussian_blur(&self, sigma: f32, kernel_size: u32) -> Result<Self>

Apply a normalized Gaussian blur with replicate borders.

Delegates to crate::image::gaussian_blur.

Source

pub fn sharpen(&self, amount: f32, border: BorderMode) -> Result<Self>

Apply a nonnegative four-neighbor sharpening amount.

Delegates to crate::image::sharpen.

Source

pub fn median_blur(&self, kernel_size: u32, border: BorderMode) -> Result<Self>

Select the median of an odd square neighborhood up to 15×15.

Delegates to crate::image::median_blur.

Source

pub fn bilateral_filter( &self, kernel_size: u32, sigma_color: f32, sigma_space: f32, border: BorderMode, ) -> Result<Self>

Apply a bilateral neighborhood filter.

Delegates to crate::image::bilateral_filter.

Source

pub fn unsharp_mask( &self, sigma: f32, amount: f32, kernel_size: u32, ) -> Result<Self>

Apply an unsharp mask using a Gaussian detail estimate.

Delegates to crate::image::unsharp_mask.

Source

pub fn morphology_top_hat( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Return the source minus its morphological opening.

Delegates to crate::image::morphology_top_hat.

Source

pub fn morphology_black_hat( &self, width: u32, height: u32, border: BorderMode, border_value: f32, ) -> Result<Self>

Return the morphological closing minus the source.

Delegates to crate::image::morphology_black_hat.

Source

pub fn adaptive_threshold_mean( &self, kernel_size: u32, c: f32, max_value: f32, border: BorderMode, ) -> Result<Self>

Threshold against the local arithmetic mean minus c.

Delegates to crate::image::adaptive_threshold_mean.

Source

pub fn adaptive_threshold_gaussian( &self, kernel_size: u32, c: f32, max_value: f32, sigma: f32, border: BorderMode, ) -> Result<Self>

Threshold against a local Gaussian-weighted mean minus c.

Delegates to crate::image::adaptive_threshold_gaussian.

Source

pub fn normalize(&self, parameters: NormalizationConfig) -> Result<Self>

Apply (pixel - mean[channel]) / std[channel] to up to three channels.

Delegates to crate::image::normalize.

Source

pub fn convert_color(&self, destination_format: ImageFormat) -> Result<Self>

Convert between three-channel RGB and BGR semantics, including identity.

Delegates to crate::image::convert_color.

Source

pub fn resize_normalize( &self, width: u32, height: u32, parameters: NormalizationConfig, ) -> Result<Self>

Bilinearly resize and normalize in one semantic and executable operation.

Delegates to crate::image::resize_normalize.

Source

pub fn segmentation_overlay( &self, mask: &Matrix, palette: &Matrix, alpha: f32, ) -> Result<Self>

Blend a class palette over an RGB/RGBA image using an I32 label map.

Delegates to crate::image::segmentation_overlay.

Source

pub fn calc_hist(&self, bins: u32, lower: f32, upper: f32) -> Result<Matrix>

Accumulate a per-plane histogram over an FP32 NCHW or CHW image.

Delegates to crate::image::calc_hist.

Source

pub fn equalize_hist(&self) -> Result<Self>

Equalize a normalized FP32 image histogram per (batch, channel) plane.

Delegates to crate::image::equalize_hist.

Source

pub fn pyr_down(&self) -> Result<Self>

Halve an FP32 image with the pyrDown Gaussian-decimate contract.

Delegates to crate::image::pyr_down.

Source

pub fn pyr_up(&self) -> Result<Self>

Double an FP32 image with the pyrUp interpolate-blur contract.

Delegates to crate::image::pyr_up.

Source

pub fn threshold_auto( &self, method: AutoThreshold, max_value: f32, ) -> Result<(Image, Matrix)>

Binary-threshold an FP32 image with a histogram-selected level.

Delegates to crate::image::threshold_auto.

Source

pub fn integral(&self) -> Result<Matrix>

Compute the per-plane summed-area table of an FP32 image.

Delegates to crate::image::integral.

Source

pub fn cvt_color(&self, conversion: ColorConversion) -> Result<Self>

Convert an FP32 image between color spaces following cvtColor.

Delegates to crate::image::cvt_color.

Source

pub fn apply_color_map(&self, colormap: ColorMap) -> Result<Self>

Map a single-channel FP32 image to RGB through a colormap.

Delegates to crate::image::apply_color_map.

Source

pub fn calc_back_project( &self, histogram: &Matrix, lower: f32, upper: f32, ) -> Result<Self>

Back-project a per-plane U32 histogram onto an FP32 image.

Delegates to crate::image::calc_back_project.

Source

pub fn clahe( &self, clip_limit: f32, tile_width: u32, tile_height: u32, ) -> Result<Self>

Contrast-limited adaptive histogram equalization per plane.

Delegates to crate::image::clahe.

Source

pub fn accumulate(&self, accumulator: &Image) -> Result<Self>

Add one image to a running accumulation image elementwise,

Delegates to crate::image::accumulate.

Source

pub fn accumulate_weighted( &self, accumulator: &Image, alpha: f32, ) -> Result<Self>

Blend an image into a running average as

Delegates to crate::image::accumulate_weighted.

Source

pub fn moments(&self) -> Result<Matrix>

Compute the ten spatial moments `m00, m10, m01, m20, m11, m02,

Delegates to crate::image::moments.

Source

pub fn psnr(&self, second: &Image, peak_value: f32) -> Result<Matrix>

Peak signal-to-noise ratio per image plane in decibels,

Delegates to crate::image::psnr.

Source

pub fn ssim(&self, second: &Image) -> Result<Matrix>

Global structural similarity per image plane through a serial

Delegates to crate::image::ssim.

Source

pub fn match_template( &self, template: &Image, method: MatchTemplate, ) -> Result<Matrix>

Slide a single-plane template over each image plane and write the

Delegates to crate::image::match_template.

Source

pub fn warp_polar( &self, center_x: f32, center_y: f32, max_radius: f32, out_width: u32, out_height: u32, mode: PolarMode, interpolation: InterpolationMode, border: BorderMode, border_value: f32, ) -> Result<Self>

Warp each image plane to polar coordinates about a center, following

Delegates to crate::image::warp_polar.

Source

pub fn canny( &self, low_threshold: f32, high_threshold: f32, hysteresis_passes: u32, ) -> Result<Self>

Canny edge detection per plane: 3x3 Sobel gradient magnitude,

Delegates to crate::image::canny.

Source

pub fn connected_components( &self, threshold: f32, connectivity: Connectivity, propagation_passes: u32, ) -> Result<Matrix>

Connected-component labeling per plane, following

Delegates to crate::image::connected_components.

Source

pub fn distance_transform( &self, threshold: f32, distance: DistanceType, propagation_passes: u32, ) -> Result<Matrix>

Distance transform per plane, following distanceTransform:

Delegates to crate::image::distance_transform.

Source

pub fn hough_lines( &self, edge_threshold: f32, rho_step: f32, theta_step: f32, threshold: u32, max_lines: u32, ) -> Result<Matrix>

Standard Hough line transform per plane, following

Delegates to crate::image::hough_lines.

Source

pub fn hough_lines_p( &self, edge_threshold: f32, rho_step: f32, theta_step: f32, threshold: u32, max_lines: u32, min_line_length: f32, max_line_gap: u32, ) -> Result<Matrix>

Probabilistic Hough segment transform per plane, following

Delegates to crate::image::hough_lines_p.

Source

pub fn find_contours( &self, threshold: f32, connectivity: Connectivity, max_contours: u32, max_points: u32, propagation_passes: u32, ) -> Result<(Matrix, Matrix)>

External contour extraction per plane, following findContours

Delegates to crate::image::find_contours.

Source

pub fn flood_fill( &self, seed_x: u32, seed_y: u32, value: f32, lo_diff: f32, up_diff: f32, connectivity: Connectivity, propagation_passes: u32, ) -> Result<Self>

Floating-range flood fill per plane, following floodFill:

Delegates to crate::image::flood_fill.

Source

pub fn draw_line( &self, x1: f32, y1: f32, x2: f32, y2: f32, color: f32, thickness: f32, ) -> Result<Self>

Draw a straight segment over a copy of the input, following line:

Delegates to crate::image::draw_line.

Source

pub fn draw_rectangle( &self, x: f32, y: f32, width: f32, height: f32, color: f32, thickness: f32, ) -> Result<Self>

Draw a rectangle border or fill over a copy of the input, following

Delegates to crate::image::draw_rectangle.

Source

pub fn draw_circle( &self, cx: f32, cy: f32, radius: f32, color: f32, thickness: f32, ) -> Result<Self>

Draw a circle ring or disk over a copy of the input, following

Delegates to crate::image::draw_circle.

Source

pub fn fill_polygon(&self, points: &Matrix, color: f32) -> Result<Self>

Fill a polygon over a copy of the input, following fillPoly: the

Delegates to crate::image::fill_polygon.

Source

pub fn corner_score( &self, block_size: u32, k: f32, score_type: CornerScore, ) -> Result<Self>

Per-pixel corner response over each plane: 3x3 Sobel gradients feed

Delegates to crate::image::corner_score.

Source

pub fn corner_fast(&self, arc_length: u32) -> Result<Self>

FAST corner response per plane on the radius-3 circle of 16

Delegates to crate::image::corner_fast.

Source

pub fn good_features_to_track( &self, max_corners: u32, quality: f32, min_distance: f32, ) -> Result<(Matrix, Matrix)>

Bounded goodFeaturesToTrack selection over a per-plane corner

Delegates to crate::image::good_features_to_track.

Source

pub fn orb( &self, max_features: u32, quality: f32, min_distance: f32, levels: u32, edge: u32, ) -> Result<(Matrix, Matrix, Matrix)>

Bounded ORB keypoint + steered rBRIEF descriptor pipeline,

Delegates to crate::image::orb.

Source

pub fn optical_flow_pyr_lk( &self, next: &Image, points: &Matrix, levels: u32, window: u32, iterations: u32, min_eigen: f32, ) -> Result<(Matrix, Matrix, Matrix)>

Sparse Lucas-Kanade optical flow with image pyramids,

Delegates to crate::image::optical_flow_pyr_lk.

Source

pub fn optical_flow_farneback( &self, next: &Image, levels: u32, window: u32, iterations: u32, poly_n: u32, poly_sigma: f32, ) -> Result<Matrix>

Dense Farneback optical flow over a 2x image pyramid,

Delegates to crate::image::optical_flow_farneback.

Source

pub fn stereo_bm( &self, right: &Image, num_disparities: u32, block_size: u32, uniqueness: u32, ) -> Result<Matrix>

Block-matching stereo disparity over the horizontal search

Delegates to crate::image::stereo_bm.

Source

pub fn fast_nl_means_denoising( &self, h: f32, template_window: u32, search_window: u32, ) -> Result<Self>

Non-local means denoising over a search window,

Delegates to crate::image::fast_nl_means_denoising.

Source

pub fn pyr_mean_shift_filtering( &self, sp: f32, sr: f32, max_level: u32, ) -> Result<Self>

Pyramid mean-shift edge-preserving smoothing, following

Delegates to crate::image::pyr_mean_shift_filtering.

Trait Implementations§

Source§

impl Clone for Image

Source§

fn clone(&self) -> Self

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

Auto Trait Implementations§

§

impl !RefUnwindSafe for Image

§

impl !Send for Image

§

impl !Sync for Image

§

impl !UnwindSafe for Image

§

impl Forget for Image

§

impl Freeze for Image
where *const RcInner<RefCell<RuntimeState>> is !null: Freeze, PhantomData<RcInner<RefCell<RuntimeState>>>: Freeze, *const RcInner<StorageInner> is !null: Freeze, PhantomData<RcInner<StorageInner>>: Freeze, *const u8 is !null: Freeze, PhantomData<usize>: Freeze, *const RcInner<MatrixSemantic> is !null: Freeze, PhantomData<RcInner<MatrixSemantic>>: Freeze, PhantomData<Rc<()>>: Freeze, *const RcInner<ImageSemantic> is !null: Freeze, PhantomData<RcInner<ImageSemantic>>: Freeze,

§

impl Move for Image

§

impl Unpin for Image
where Rc<RefCell<RuntimeState>>: Unpin, Rc<StorageInner>: Unpin, *const u8 is !null: Unpin, Rc<MatrixSemantic>: Unpin, Rc<()>: Unpin, Rc<ImageSemantic>: Unpin,

§

impl UnsafeUnpin for Image
where *const RcInner<RefCell<RuntimeState>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<RuntimeState>>>: UnsafeUnpin, *const RcInner<StorageInner> is !null: UnsafeUnpin, PhantomData<RcInner<StorageInner>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, *const RcInner<MatrixSemantic> is !null: UnsafeUnpin, PhantomData<RcInner<MatrixSemantic>>: UnsafeUnpin, PhantomData<Rc<()>>: UnsafeUnpin, *const RcInner<ImageSemantic> is !null: UnsafeUnpin, PhantomData<RcInner<ImageSemantic>>: UnsafeUnpin,

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
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

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

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

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

Source§

fn to_sample_(self) -> U

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.