BCDDFunction

Struct BCDDFunction 

Source
pub struct BCDDFunction<F: Function>(/* private fields */);
Expand description

Boolean function backed by a complement edge binary decision diagram

Implementations§

Source§

impl<F: Function> BCDDFunction<F>

Source

pub fn into_inner(self) -> F

Convert self into the underlying Function

Trait Implementations§

Source§

impl<F: Function> BooleanFunction for BCDDFunction<F>
where for<'id> F::Manager<'id>: Manager<Terminal = BCDDTerminal, EdgeTag = EdgeTag> + HasBCDDOpApplyCache<F::Manager<'id>>, for<'id> INodeOfFunc<'id, F>: HasLevel,

Source§

fn var_edge<'id>( manager: &Self::Manager<'id>, var: VarNo, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Get the Boolean function (as edge) that is true if and only if var is true Read more
Source§

fn f_edge<'id>(manager: &Self::Manager<'id>) -> EdgeOfFunc<'id, Self>

Get the always false function as edge
Source§

fn t_edge<'id>(manager: &Self::Manager<'id>) -> EdgeOfFunc<'id, Self>

Get the always true function as edge
Source§

fn not_edge<'id>( manager: &Self::Manager<'id>, edge: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the negation ¬edge, edge version
Source§

fn not_edge_owned<'id>( _manager: &Self::Manager<'id>, edge: EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the negation ¬edge, owned edge version Read more
Source§

fn and_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the conjunction lhs ∧ rhs, edge version
Source§

fn or_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the disjunction lhs ∨ rhs, edge version
Source§

fn nand_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the negated conjunction lhs ⊼ rhs, edge version
Source§

fn nor_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the negated disjunction lhs ⊽ rhs, edge version
Source§

fn xor_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the exclusive disjunction lhs ⊕ rhs, edge version
Source§

fn equiv_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the equivalence lhs ↔ rhs, edge version
Source§

fn imp_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the implication lhs → rhs, edge version
Source§

fn imp_strict_edge<'id>( manager: &Self::Manager<'id>, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the strict implication lhs < rhs, edge version
Source§

fn ite_edge<'id>( manager: &Self::Manager<'id>, if_edge: &EdgeOfFunc<'id, Self>, then_edge: &EdgeOfFunc<'id, Self>, else_edge: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute if if_edge { then_edge } else { else_edge } (edge version) Read more
Source§

fn sat_count_edge<'id, N: SatCountNumber, S: BuildHasher>( manager: &Self::Manager<'id>, edge: &EdgeOfFunc<'id, Self>, vars: LevelNo, cache: &mut SatCountCache<N, S>, ) -> N

Edge version of Self::sat_count()
Source§

fn pick_cube_edge<'id>( manager: &Self::Manager<'id>, edge: &EdgeOfFunc<'id, Self>, choice: impl FnMut(&Self::Manager<'id>, &EdgeOfFunc<'id, Self>, LevelNo) -> bool, ) -> Option<Vec<OptBool>>

Edge version of Self::pick_cube()
Source§

fn pick_cube_dd_edge<'id>( manager: &Self::Manager<'id>, edge: &EdgeOfFunc<'id, Self>, choice: impl FnMut(&Self::Manager<'id>, &EdgeOfFunc<'id, Self>, LevelNo) -> bool, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Edge version of Self::pick_cube_dd()
Source§

fn pick_cube_dd_set_edge<'id>( manager: &Self::Manager<'id>, edge: &EdgeOfFunc<'id, Self>, literal_set: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Edge version of Self::pick_cube_dd_set()
Source§

fn eval_edge<'id>( manager: &Self::Manager<'id>, edge: &EdgeOfFunc<'id, Self>, args: impl IntoIterator<Item = (VarNo, bool)>, ) -> bool

Edge version of Self::eval()
Source§

fn f<'id>(manager: &Self::Manager<'id>) -> Self

Get the always false function
Source§

fn t<'id>(manager: &Self::Manager<'id>) -> Self

Get the always true function
Source§

fn var<'id>(manager: &Self::Manager<'id>, var: u32) -> Result<Self, OutOfMemory>

Get the Boolean function that is true if and only if var is true Read more
Source§

fn not_var<'id>( manager: &Self::Manager<'id>, var: u32, ) -> Result<Self, OutOfMemory>

Get the Boolean function that is true if and only if var is false Read more
Source§

fn cofactors(&self) -> Option<(Self, Self)>

Get the cofactors (f_true, f_false) of self Read more
Source§

fn cofactor_true(&self) -> Option<Self>

Get the cofactor f_true of self Read more
Source§

fn cofactor_false(&self) -> Option<Self>

Get the cofactor f_false of self Read more
Source§

fn not(&self) -> Result<Self, OutOfMemory>

Compute the negation ¬self Read more
Source§

fn not_owned(self) -> Result<Self, OutOfMemory>

Compute the negation ¬self, owned version Read more
Source§

fn and(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the conjunction self ∧ rhs Read more
Source§

fn or(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the disjunction self ∨ rhs Read more
Source§

fn nand(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the negated conjunction self ⊼ rhs Read more
Source§

fn nor(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the negated disjunction self ⊽ rhs Read more
Source§

fn xor(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the exclusive disjunction self ⊕ rhs Read more
Source§

fn equiv(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the equivalence self ↔ rhs Read more
Source§

fn imp(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the implication self → rhs (or self ≤ rhs) Read more
Source§

fn imp_strict(&self, rhs: &Self) -> Result<Self, OutOfMemory>

Compute the strict implication self < rhs Read more
Source§

fn not_var_edge<'id>( manager: &Self::Manager<'id>, var: u32, ) -> Result<<Self::Manager<'id> as Manager>::Edge, OutOfMemory>

Get the Boolean function (as edge) that is true if and only if var is false Read more
Source§

fn cofactors_edge<'a, 'id>( manager: &'a Self::Manager<'id>, f: &'a <Self::Manager<'id> as Manager>::Edge, ) -> Option<(Borrowed<'a, <Self::Manager<'id> as Manager>::Edge>, Borrowed<'a, <Self::Manager<'id> as Manager>::Edge>)>

Get the cofactors (f_true, f_false) of f, edge version Read more
Source§

fn cofactors_node<'a, 'id>( tag: <Self::Manager<'id> as Manager>::EdgeTag, node: &'a <Self::Manager<'id> as Manager>::InnerNode, ) -> (Borrowed<'a, <Self::Manager<'id> as Manager>::Edge>, Borrowed<'a, <Self::Manager<'id> as Manager>::Edge>)

Get the cofactors (f_true, f_false) of node, assuming an incoming edge with EdgeTag Read more
Source§

fn satisfiable(&self) -> bool

Returns true iff self is satisfiable, i.e. is not Read more
Source§

fn valid(&self) -> bool

Returns true iff self is valid, i.e. is Read more
Source§

fn ite(&self, then_case: &Self, else_case: &Self) -> Result<Self, OutOfMemory>

Compute if self { then_case } else { else_case } Read more
Source§

fn sat_count<N, S>(&self, vars: u32, cache: &mut SatCountCache<N, S>) -> N

Count the number of satisfying assignments, assuming vars input variables Read more
Source§

fn pick_cube( &self, choice: impl for<'id> FnMut(&Self::Manager<'id>, &<Self::Manager<'id> as Manager>::Edge, u32) -> bool, ) -> Option<Vec<OptBool>>

Pick a cube of this function Read more
Source§

fn pick_cube_dd( &self, choice: impl for<'id> FnMut(&Self::Manager<'id>, &<Self::Manager<'id> as Manager>::Edge, u32) -> bool, ) -> Result<Self, OutOfMemory>

Pick a symbolic cube of this function, i.e., as decision diagram Read more
Source§

fn pick_cube_dd_set(&self, literal_set: &Self) -> Result<Self, OutOfMemory>

Pick a symbolic cube of this function, i.e., as decision diagram, using the literals in literal_set if there is a choice Read more
Source§

fn pick_cube_uniform<S>( &self, cache: &mut SatCountCache<F64, S>, rng: &mut WyRand, ) -> Option<Vec<OptBool>>
where S: BuildHasher,

Pick a random cube of this function, where each cube has the same probability of being chosen Read more
Source§

fn pick_cube_uniform_edge<'id, S>( manager: &Self::Manager<'id>, edge: &<Self::Manager<'id> as Manager>::Edge, cache: &mut SatCountCache<F64, S>, rng: &mut WyRand, ) -> Option<Vec<OptBool>>
where S: BuildHasher,

Source§

fn eval(&self, args: impl IntoIterator<Item = (u32, bool)>) -> bool

Evaluate this Boolean function Read more
Source§

impl<F: Function> BooleanFunctionQuant for BCDDFunction<F>
where for<'id> F::Manager<'id>: Manager<Terminal = BCDDTerminal, EdgeTag = EdgeTag> + HasBCDDOpApplyCache<F::Manager<'id>>, for<'id> INodeOfFunc<'id, F>: HasLevel,

Source§

fn restrict_edge<'id>( manager: &Self::Manager<'id>, root: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Restrict a set of vars to constant values, edge version Read more
Source§

fn forall_edge<'id>( manager: &Self::Manager<'id>, root: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the universal quantification of root over vars, edge version Read more
Source§

fn exists_edge<'id>( manager: &Self::Manager<'id>, root: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the existential quantification of root over vars, edge version Read more
Source§

fn unique_edge<'id>( manager: &Self::Manager<'id>, root: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Compute the unique quantification of root over vars, edge version Read more
Source§

fn apply_forall_edge<'id>( manager: &Self::Manager<'id>, op: BooleanOperator, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Combined application of op and forall quantification, edge version Read more
Source§

fn apply_exists_edge<'id>( manager: &Self::Manager<'id>, op: BooleanOperator, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Combined application of op and existential quantification, edge version Read more
Source§

fn apply_unique_edge<'id>( manager: &Self::Manager<'id>, op: BooleanOperator, lhs: &EdgeOfFunc<'id, Self>, rhs: &EdgeOfFunc<'id, Self>, vars: &EdgeOfFunc<'id, Self>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Combined application of op and unique quantification, edge version Read more
Source§

fn restrict(&self, vars: &Self) -> Result<Self, OutOfMemory>

Restrict a set of vars to constant values Read more
Source§

fn forall(&self, vars: &Self) -> Result<Self, OutOfMemory>

Compute the universal quantification over vars Read more
Source§

fn exists(&self, vars: &Self) -> Result<Self, OutOfMemory>

Compute the existential quantification over vars Read more
Source§

fn exist(&self, vars: &Self) -> Result<Self, OutOfMemory>

👎Deprecated
Deprecated alias for Self::exists()
Source§

fn unique(&self, vars: &Self) -> Result<Self, OutOfMemory>

Compute the unique quantification over vars Read more
Source§

fn apply_forall( &self, op: BooleanOperator, rhs: &Self, vars: &Self, ) -> Result<Self, OutOfMemory>

Combined application of op and quantification ∀x. self <op> rhs, where <op> is any of the operations from BooleanOperator Read more
Source§

fn apply_exists( &self, op: BooleanOperator, rhs: &Self, vars: &Self, ) -> Result<Self, OutOfMemory>

Combined application of op and quantification ∃x. self <op> rhs, where <op> is any of the operations from BooleanOperator Read more
Source§

fn apply_exist( &self, op: BooleanOperator, rhs: &Self, vars: &Self, ) -> Result<Self, OutOfMemory>

👎Deprecated
Deprecated alias for Self::apply_exists()
Source§

fn apply_unique( &self, op: BooleanOperator, rhs: &Self, vars: &Self, ) -> Result<Self, OutOfMemory>

Combined application of op and quantification ∃!x. self <op> rhs, where <op> is any of the operations from BooleanOperator Read more
Source§

fn exist_edge<'id>( manager: &Self::Manager<'id>, root: &<Self::Manager<'id> as Manager>::Edge, vars: &<Self::Manager<'id> as Manager>::Edge, ) -> Result<<Self::Manager<'id> as Manager>::Edge, OutOfMemory>

👎Deprecated
Deprecated alias for Self::exists_edge()
Source§

fn apply_exist_edge<'id>( manager: &Self::Manager<'id>, op: BooleanOperator, lhs: &<Self::Manager<'id> as Manager>::Edge, rhs: &<Self::Manager<'id> as Manager>::Edge, vars: &<Self::Manager<'id> as Manager>::Edge, ) -> Result<<Self::Manager<'id> as Manager>::Edge, OutOfMemory>

👎Deprecated
Deprecated alias for Self::apply_exists_edge()
Source§

impl<F: Clone + Function> Clone for BCDDFunction<F>

Source§

fn clone(&self) -> BCDDFunction<F>

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

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

Performs copy-assignment from source. Read more
Source§

impl<F: Debug + Function> Debug for BCDDFunction<F>

Source§

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

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

impl<F: Function, T: Tag> DotStyle<T> for BCDDFunction<F>

Source§

fn edge_style(no: usize, tag: T) -> (EdgeStyle, bool, Color)

Get the style for the n-th outgoing edge, tagged with tag Read more
Source§

impl<F: Function> From<F> for BCDDFunction<F>

Source§

fn from(value: F) -> Self

Converts to this type from the input type.
Source§

impl<F: Function> Function for BCDDFunction<F>

Source§

const REPR_ID: &'static str = "BCDD"

Representation identifier such as “BDD” or “MTBDD”
Source§

type Manager<'__id> = <F as Function>::Manager<'__id>

Type of the associated manager Read more
Source§

type ManagerRef = <F as Function>::ManagerRef

Source§

fn from_edge<'__id>( manager: &Self::Manager<'__id>, edge: <Self::Manager<'__id> as Manager>::Edge, ) -> Self

Create a new function from a manager reference and an edge
Source§

fn as_edge<'__id>( &self, manager: &Self::Manager<'__id>, ) -> &<Self::Manager<'__id> as Manager>::Edge

Converts this function into the underlying edge (as reference), checking that it belongs to the given manager Read more
Source§

fn into_edge<'__id>( self, manager: &Self::Manager<'__id>, ) -> <Self::Manager<'__id> as Manager>::Edge

Converts this function into the underlying edge, checking that it belongs to the given manager Read more
Source§

fn manager_ref(&self) -> <F as Function>::ManagerRef

Clone the ManagerRef part
Source§

fn with_manager_shared<__F, __T>(&self, f: __F) -> __T
where __F: for<'__id> FnOnce(&Self::Manager<'__id>, &<Self::Manager<'__id> as Manager>::Edge) -> __T,

Obtain a shared manager reference as well as the underlying edge Read more
Source§

fn with_manager_exclusive<__F, __T>(&self, f: __F) -> __T
where __F: for<'__id> FnOnce(&mut Self::Manager<'__id>, &<Self::Manager<'__id> as Manager>::Edge) -> __T,

Obtain an exclusive manager reference as well as the underlying edge Read more
Source§

fn from_edge_ref<'id>( manager: &Self::Manager<'id>, edge: &<Self::Manager<'id> as Manager>::Edge, ) -> Self

Create a new function from a manager reference and an edge reference
Source§

fn node_count(&self) -> usize

Count the number of nodes in this function, including terminal nodes Read more
Source§

impl<F: Function> FunctionSubst for BCDDFunction<F>
where for<'id> F::Manager<'id>: Manager<Terminal = BCDDTerminal, EdgeTag = EdgeTag> + HasBCDDOpApplyCache<F::Manager<'id>>, for<'id> INodeOfFunc<'id, F>: HasLevel,

Source§

fn substitute_edge<'id, 'a>( manager: &'a Self::Manager<'id>, edge: &'a EdgeOfFunc<'id, Self>, substitution: impl Substitution<Replacement = Borrowed<'a, EdgeOfFunc<'id, Self>>>, ) -> AllocResult<EdgeOfFunc<'id, Self>>

Edge version of Self::substitute()
Source§

fn substitute<'a>( &'a self, substitution: impl Substitution<Replacement = &'a Self>, ) -> Result<Self, OutOfMemory>

Substitute variables in self according to substitution Read more
Source§

impl<F: Hash + Function> Hash for BCDDFunction<F>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<F: Ord + Function> Ord for BCDDFunction<F>

Source§

fn cmp(&self, other: &BCDDFunction<F>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<F: PartialEq + Function> PartialEq for BCDDFunction<F>

Source§

fn eq(&self, other: &BCDDFunction<F>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

impl<F: PartialOrd + Function> PartialOrd for BCDDFunction<F>

Source§

fn partial_cmp(&self, other: &BCDDFunction<F>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<F: Eq + Function> Eq for BCDDFunction<F>

Source§

impl<F: Function> StructuralPartialEq for BCDDFunction<F>

Auto Trait Implementations§

§

impl<F> Freeze for BCDDFunction<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for BCDDFunction<F>
where F: RefUnwindSafe,

§

impl<F> Send for BCDDFunction<F>
where F: Send,

§

impl<F> Sync for BCDDFunction<F>
where F: Sync,

§

impl<F> Unpin for BCDDFunction<F>
where F: Unpin,

§

impl<F> UnwindSafe for BCDDFunction<F>
where F: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> 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> 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 = 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.