PdfPageXObjectFormObject

Struct PdfPageXObjectFormObject 

Source
pub struct PdfPageXObjectFormObject<'a> { /* private fields */ }
Expand description

A single PdfPageObject of type PdfPageObjectType::XObjectForm. The page object contains a content stream that itself may consist of multiple other page objects. When this page object is rendered, it renders all its constituent page objects, effectively serving as a template or stamping object.

Despite the page object name including “form”, this page object type bears no relation to an interactive form containing form fields.

New PdfPageObjectType::XObjectForm objects can be created by calling either the PdfPageObjects::copy_into_x_object_form_object() function or the PdfPageGroupObject::copy_into_x_object_form_object() function.

Implementations§

Source§

impl<'a> PdfPageXObjectFormObject<'a>

Source

pub fn len(&self) -> PdfPageObjectIndex

Returns the total number of child page objects in this PdfPageXObjectFormObject.

Source

pub fn is_empty(&self) -> bool

Returns true if this page objects collection is empty.

Source

pub fn as_range(&self) -> Range<PdfPageObjectIndex>

Returns a Range from 0..(number of objects) for the child page objects in this PdfPageXObjectFormObject.

Source

pub fn as_range_inclusive(&self) -> RangeInclusive<PdfPageObjectIndex>

Returns an inclusive Range from 0..=(number of objects - 1) for the child page objects in this PdfPageXObjectFormObject.

Source

pub fn get( &self, index: PdfPageObjectIndex, ) -> Result<PdfPageObject<'a>, PdfiumError>

Returns a single child PdfPageObject from this PdfPageXObjectFormObject.

Source

pub fn first(&self) -> Result<PdfPageObject<'a>, PdfiumError>

Returns the first child PdfPageObject in this PdfPageXObjectFormObject.

Source

pub fn last(&self) -> Result<PdfPageObject<'a>, PdfiumError>

Returns the last child PdfPageObject in this PdfPageXObjectFormObject.

Source

pub fn iter(&'a self) -> PdfPageObjectsIterator<'a>

Returns an iterator over all the child PdfPageObject objects in this PdfPageXObjectFormObject.

Source

pub fn transform( &mut self, a: PdfMatrixValue, b: PdfMatrixValue, c: PdfMatrixValue, d: PdfMatrixValue, e: PdfMatrixValue, f: PdfMatrixValue, ) -> Result<(), PdfiumError>

Applies the given transformation, expressed as six values representing the six configurable elements of a nine-element 3x3 PDF transformation matrix, to this PdfPageXObjectFormObject.

To move, scale, rotate, or skew this PdfPageXObjectFormObject, consider using one or more of the following functions. Internally they all use Self::transform(), but are probably easier to use (and certainly clearer in their intent) in most situations.

The order in which transformations are applied is significant. For example, the result of rotating then translating an object may be vastly different from translating then rotating the same object.

An overview of PDF transformation matrices can be found in the PDF Reference Manual version 1.7 on page 204; a detailed description can be found in section 4.2.3 on page 207.

Source

pub fn apply_matrix(&mut self, matrix: PdfMatrix) -> Result<(), PdfiumError>

Applies the given transformation, expressed as a PdfMatrix, to this PdfPageXObjectFormObject.

Source

pub fn reset_matrix(&mut self, matrix: PdfMatrix) -> Result<(), PdfiumError>

Resets the transform matrix for this PdfPageXObjectFormObject to the the given PdfMatrix, overriding any previously applied transformations.

Source

pub fn reset_matrix_to_identity(&mut self) -> Result<(), PdfiumError>

Resets the transformation matrix for this PdfPageXObjectFormObject to the identity matrix, undoing any previously applied transformations.

Source

pub fn translate( &mut self, delta_x: PdfPoints, delta_y: PdfPoints, ) -> Result<(), PdfiumError>

Moves the origin of this PdfPageXObjectFormObject by the given horizontal and vertical delta distances.

Source

pub fn scale( &mut self, horizontal_scale_factor: PdfMatrixValue, vertical_scale_factor: PdfMatrixValue, ) -> Result<(), PdfiumError>

Changes the size of this PdfPageXObjectFormObject, scaling it by the given horizontal and vertical scale factors.

Source

pub fn flip_horizontally(&mut self) -> Result<(), PdfiumError>

Flips this PdfPageXObjectFormObject horizontally around its origin by applying a horizontal scale factor of -1.

Source

pub fn flip_vertically(&mut self) -> Result<(), PdfiumError>

Flips this PdfPageXObjectFormObject vertically around its origin by applying a vertical scale factor of -1.

Source

pub fn reflect(&mut self) -> Result<(), PdfiumError>

Reflects this PdfPageXObjectFormObject by flipping it both horizontally and vertically around its origin.

Source

pub fn rotate_counter_clockwise_degrees( &mut self, degrees: PdfMatrixValue, ) -> Result<(), PdfiumError>

Rotates this PdfPageXObjectFormObject counter-clockwise by the given number of degrees.

Source

pub fn rotate_clockwise_degrees( &mut self, degrees: PdfMatrixValue, ) -> Result<(), PdfiumError>

Rotates this PdfPageXObjectFormObject clockwise by the given number of degrees.

Source

pub fn rotate_counter_clockwise_radians( &mut self, radians: PdfMatrixValue, ) -> Result<(), PdfiumError>

Rotates this PdfPageXObjectFormObject counter-clockwise by the given number of radians.

Source

pub fn rotate_clockwise_radians( &mut self, radians: PdfMatrixValue, ) -> Result<(), PdfiumError>

Rotates this PdfPageXObjectFormObject clockwise by the given number of radians.

Source

pub fn skew_degrees( &mut self, x_axis_skew: PdfMatrixValue, y_axis_skew: PdfMatrixValue, ) -> Result<(), PdfiumError>

Skews the axes of this PdfPageXObjectFormObject by the given angles in degrees.

Source

pub fn skew_radians( &mut self, x_axis_skew: PdfMatrixValue, y_axis_skew: PdfMatrixValue, ) -> Result<(), PdfiumError>

Skews the axes of this PdfPageXObjectFormObject by the given angles in radians.

Source

pub fn matrix(&self) -> Result<PdfMatrix, PdfiumError>

Returns the transformation matrix currently applied to this PdfPageXObjectFormObject.

Source

pub fn get_translation(&self) -> (PdfPoints, PdfPoints)

Returns the current horizontal and vertical translation of the origin of this PdfPageXObjectFormObject.

Source

pub fn get_horizontal_translation(&self) -> PdfPoints

Returns the current horizontal translation of the origin of this PdfPageXObjectFormObject.

Source

pub fn get_vertical_translation(&self) -> PdfPoints

Returns the current vertical translation of the origin of this PdfPageXObjectFormObject.

Source

pub fn get_scale(&self) -> (PdfMatrixValue, PdfMatrixValue)

Returns the current horizontal and vertical scale factors applied to this PdfPageXObjectFormObject.

Source

pub fn get_horizontal_scale(&self) -> PdfMatrixValue

Returns the current horizontal scale factor applied to this PdfPageXObjectFormObject.

Source

pub fn get_vertical_scale(&self) -> PdfMatrixValue

Returns the current vertical scale factor applied to this PdfPageXObjectFormObject.

Source

pub fn get_rotation_counter_clockwise_degrees(&self) -> PdfMatrixValue

Returns the counter-clockwise rotation applied to this PdfPageXObjectFormObject, in degrees.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_rotation_clockwise_degrees(&self) -> PdfMatrixValue

Returns the clockwise rotation applied to this PdfPageXObjectFormObject, in degrees.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_rotation_counter_clockwise_radians(&self) -> PdfMatrixValue

Returns the counter-clockwise rotation applied to this PdfPageXObjectFormObject, in radians.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_rotation_clockwise_radians(&self) -> PdfMatrixValue

Returns the clockwise rotation applied to this PdfPageXObjectFormObject, in radians.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_skew_degrees(&self) -> (PdfMatrixValue, PdfMatrixValue)

Returns the current x axis and y axis skew angles applied to this PdfPageXObjectFormObject, in degrees.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_x_axis_skew_degrees(&self) -> PdfMatrixValue

Returns the current x axis skew angle applied to this PdfPageXObjectFormObject, in degrees.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_y_axis_skew_degrees(&self) -> PdfMatrixValue

Returns the current y axis skew applied to this PdfPageXObjectFormObject, in degrees.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_skew_radians(&self) -> (PdfMatrixValue, PdfMatrixValue)

Returns the current x axis and y axis skew angles applied to this PdfPageXObjectFormObject, in radians.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_x_axis_skew_radians(&self) -> PdfMatrixValue

Returns the current x axis skew applied to this PdfPageXObjectFormObject, in radians.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Source

pub fn get_y_axis_skew_radians(&self) -> PdfMatrixValue

Returns the current y axis skew applied to this PdfPageXObjectFormObject, in radians.

If the object is both rotated and skewed, the return value of this function will reflect the combined operation.

Trait Implementations§

Source§

impl<'a> Drop for PdfPageXObjectFormObject<'a>

Source§

fn drop(&mut self)

Closes this PdfPageXObjectFormObject, releasing held memory.

Source§

impl<'a> From<PdfPageXObjectFormObject<'a>> for PdfPageObject<'a>

Source§

fn from(object: PdfPageXObjectFormObject<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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

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

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

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

impl<'a, T> PdfPageObjectCommon<'a> for T
where T: PdfPageObjectPrivate<'a>,

Source§

fn has_transparency(&self) -> bool

Returns true if this PdfPageObject contains transparency.
Source§

fn bounds(&self) -> Result<PdfQuadPoints, PdfiumError>

Returns the bounding box of this PdfPageObject as a quadrilateral. Read more
Source§

fn transform_from( &mut self, other: &PdfPageObject<'_>, ) -> Result<(), PdfiumError>

Transforms this PdfPageObject by applying the transformation matrix read from the given PdfPageObject. Read more
Source§

fn set_blend_mode( &mut self, blend_mode: PdfPageObjectBlendMode, ) -> Result<(), PdfiumError>

Sets the blend mode that will be applied when painting this PdfPageObject. Read more
Source§

fn fill_color(&self) -> Result<PdfColor, PdfiumError>

Returns the color of any filled paths in this PdfPageObject.
Source§

fn set_fill_color(&mut self, fill_color: PdfColor) -> Result<(), PdfiumError>

Sets the color of any filled paths in this PdfPageObject.
Source§

fn stroke_color(&self) -> Result<PdfColor, PdfiumError>

Returns the color of any stroked paths in this PdfPageObject.
Source§

fn set_stroke_color( &mut self, stroke_color: PdfColor, ) -> Result<(), PdfiumError>

Sets the color of any stroked paths in this PdfPageObject. Read more
Source§

fn stroke_width(&self) -> Result<PdfPoints, PdfiumError>

Returns the width of any stroked lines in this PdfPageObject.
Source§

fn set_stroke_width( &mut self, stroke_width: PdfPoints, ) -> Result<(), PdfiumError>

Sets the width of any stroked lines in this PdfPageObject. Read more
Source§

fn line_join(&self) -> Result<PdfPageObjectLineJoin, PdfiumError>

Returns the line join style that will be used when painting stroked path segments in this PdfPageObject.
Source§

fn set_line_join( &mut self, line_join: PdfPageObjectLineJoin, ) -> Result<(), PdfiumError>

Sets the line join style that will be used when painting stroked path segments in this PdfPageObject.
Source§

fn line_cap(&self) -> Result<PdfPageObjectLineCap, PdfiumError>

Returns the line cap style that will be used when painting stroked path segments in this PdfPageObject.
Source§

fn set_line_cap( &mut self, line_cap: PdfPageObjectLineCap, ) -> Result<(), PdfiumError>

Sets the line cap style that will be used when painting stroked path segments in this PdfPageObject.
Source§

fn dash_phase(&self) -> Result<PdfPoints, PdfiumError>

Returns the line dash phase that will be used when painting stroked path segments in this PdfPageObject. Read more
Source§

fn set_dash_phase(&mut self, dash_phase: PdfPoints) -> Result<(), PdfiumError>

Sets the line dash phase that will be used when painting stroked path segments in this PdfPageObject. Read more
Source§

fn dash_array(&self) -> Result<Vec<PdfPoints>, PdfiumError>

Returns the line dash array that will be used when painting stroked path segments in this PdfPageObject. Read more
Source§

fn set_dash_array( &mut self, array: &[PdfPoints], phase: PdfPoints, ) -> Result<(), PdfiumError>

Sets the line dash array that will be used when painting stroked path segments in this PdfPageObject. Read more
Source§

fn is_copyable(&self) -> bool

👎Deprecated since 0.8.32: This function has been retired in favour of the PdfPageObject::copy_to_page() function.
Returns true if this PdfPageObject can be successfully copied by calling its try_copy() function. Read more
Source§

fn try_copy<'b>( &self, document: &'b PdfDocument<'b>, ) -> Result<PdfPageObject<'b>, PdfiumError>

👎Deprecated since 0.8.32: This function has been retired in favour of the PdfPageObject::copy_to_page() function.
Attempts to copy this PdfPageObject by creating a new page object and copying across all the properties of this PdfPageObject to the new page object. Read more
Source§

fn copy_to_page<'b>( &mut self, page: &mut PdfPage<'b>, ) -> Result<PdfPageObject<'b>, PdfiumError>

Copies this PdfPageObject object into a new PdfPageXObjectFormObject, then adds the new form object to the page objects collection of the given PdfPage, returning the new form object.
Source§

fn move_to_page(&mut self, page: &mut PdfPage<'_>) -> Result<(), PdfiumError>

Moves the ownership of this PdfPageObject to the given PdfPage, regenerating page content as necessary. Read more
Source§

fn move_to_annotation( &mut self, annotation: &mut PdfPageAnnotation<'_>, ) -> Result<(), PdfiumError>

Moves the ownership of this PdfPageObject to the given PdfPageAnnotation, regenerating page content as necessary. Read more
Source§

fn width(&self) -> Result<PdfPoints, PdfiumError>

Returns the width of this PdfPageObject.
Source§

fn height(&self) -> Result<PdfPoints, PdfiumError>

Returns the height of this PdfPageObject.
Source§

fn is_inside_rect(&self, rect: &PdfRect) -> bool

Returns true if the bounds of this PdfPageObject lie entirely within the given rectangle.
Source§

fn does_overlap_rect(&self, rect: &PdfRect) -> bool

Returns true if the bounds of this PdfPageObject lie at least partially within the given rectangle.
Source§

impl<'a, T> PdfPageObjectsCommon<'a> for T
where T: PdfPageObjectsPrivate<'a>,

Source§

fn len(&self) -> usize

Returns the total number of page objects in the collection.
Source§

fn get(&self, index: usize) -> Result<PdfPageObject<'a>, PdfiumError>

Returns a single PdfPageObject from this page objects collection.
Source§

fn iter(&'a self) -> PdfPageObjectsIterator<'a>

Returns an iterator over all the PdfPageObject objects in this page objects collection.
Source§

fn add_object( &mut self, object: PdfPageObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Adds the given PdfPageObject to this page objects collection. The object’s memory ownership will be transferred to the PdfPage containing this page objects collection, and the updated page object will be returned. Read more
Source§

fn create_text_object( &mut self, x: PdfPoints, y: PdfPoints, text: impl ToString, font: impl ToPdfFontToken, font_size: PdfPoints, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPageTextObject at the given x and y page co-ordinates from the given arguments and adds it to this page objects collection, returning the text object wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_line( &mut self, x1: PdfPoints, y1: PdfPoints, x2: PdfPoints, y2: PdfPoints, stroke_color: PdfColor, stroke_width: PdfPoints, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject for the given line, with the given stroke settings applied. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_bezier( &mut self, x1: PdfPoints, y1: PdfPoints, x2: PdfPoints, y2: PdfPoints, control1_x: PdfPoints, control1_y: PdfPoints, control2_x: PdfPoints, control2_y: PdfPoints, stroke_color: PdfColor, stroke_width: PdfPoints, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject for the given cubic Bézier curve, with the given stroke settings applied. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_rect( &mut self, rect: PdfRect, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject for the given rectangle, with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the rectangle to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_circle( &mut self, rect: PdfRect, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject. The new path will be created with a circle that fills the given rectangle, with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the circle to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_circle_at( &mut self, center_x: PdfPoints, center_y: PdfPoints, radius: PdfPoints, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject. The new path will be created with a circle centered at the given coordinates, with the given radius, and with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the circle to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_ellipse( &mut self, rect: PdfRect, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject. The new path will be created with an ellipse that fills the given rectangle, with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the ellipse to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_path_object_ellipse_at( &mut self, center_x: PdfPoints, center_y: PdfPoints, x_radius: PdfPoints, y_radius: PdfPoints, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPagePathObject. The new path will be created with an ellipse centered at the given coordinates, with the given radii, and with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the ellipse to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn create_image_object( &mut self, x: PdfPoints, y: PdfPoints, image: &DynamicImage, width: Option<PdfPoints>, height: Option<PdfPoints>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Creates a new PdfPageImageObject at the given x and y page co-ordinates from the given arguments and adds it to this page objects collection, returning the image object wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn remove_object( &mut self, object: PdfPageObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Removes the given PdfPageObject from this page objects collection. The object’s memory ownership will be removed from the PdfPage containing this page objects collection, and the updated page object will be returned. It can be added back to a page objects collection or dropped, at which point the memory owned by the object will be freed. Read more
Source§

fn remove_object_at_index( &mut self, index: usize, ) -> Result<PdfPageObject<'a>, PdfiumError>

Removes the PdfPageObject at the given index from this page objects collection. The object’s memory ownership will be removed from the PdfPage containing this page objects collection, and the updated page object will be returned. It can be added back into a page objects collection or discarded, at which point the memory owned by the object will be freed. Read more
Source§

fn is_empty(&self) -> bool

Returns true if this page objects collection is empty.
Source§

fn as_range(&self) -> Range<PdfPageObjectIndex>

Returns a Range from 0..(number of objects) for this page objects collection.
Source§

fn as_range_inclusive(&self) -> RangeInclusive<PdfPageObjectIndex>

Returns an inclusive Range from 0..=(number of objects - 1) for this page objects collection.
Source§

fn first(&self) -> Result<PdfPageObject<'a>, PdfiumError>

Returns the first PdfPageObject in this page objects collection.
Source§

fn last(&self) -> Result<PdfPageObject<'a>, PdfiumError>

Returns the last PdfPageObject in this page objects collection.
Source§

fn bounds(&'a self) -> PdfRect

Returns the smallest bounding box that contains all the PdfPageObject objects in this page objects collection.
Source§

fn add_text_object( &mut self, object: PdfPageTextObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Adds the given PdfPageTextObject to this page objects collection, returning the text object wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn add_path_object( &mut self, object: PdfPagePathObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Adds the given PdfPagePathObject to this page objects collection, returning the path object wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn add_x_object_form_object( &mut self, object: PdfPageXObjectFormObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Adds the given PdfPageXObjectFormObject to this page objects collection, returning the XObject form object wrapped inside a generic PdfPageObject wrapper. Read more
Source§

fn add_image_object( &mut self, object: PdfPageImageObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>

Adds the given PdfPageImageObject to this page objects collection, returning the image object wrapped inside a generic PdfPageObject wrapper. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.