Enum tract_hir::infer::GenericFactoid
source · pub enum GenericFactoid<T: Debug + Clone + PartialEq + Hash> {
Only(T),
Any,
}
Expand description
Partial information about a value of type T.
Variants§
Trait Implementations§
source§impl<T, I> Add<I> for GenericFactoid<T>
impl<T, I> Add<I> for GenericFactoid<T>
source§impl<T: Clone + Debug + Clone + PartialEq + Hash> Clone for GenericFactoid<T>
impl<T: Clone + Debug + Clone + PartialEq + Hash> Clone for GenericFactoid<T>
source§fn clone(&self) -> GenericFactoid<T>
fn clone(&self) -> GenericFactoid<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T, R> Div<R> for GenericFactoid<T>
impl<T, R> Div<R> for GenericFactoid<T>
source§impl<T: Debug + Clone + PartialEq + Hash> Factoid for GenericFactoid<T>
impl<T: Debug + Clone + PartialEq + Hash> Factoid for GenericFactoid<T>
source§fn concretize(&self) -> Option<T>
fn concretize(&self) -> Option<T>
Tries to transform the fact into a concrete value.
source§fn unify(&self, other: &Self) -> TractResult<Self>
fn unify(&self, other: &Self) -> TractResult<Self>
Tries to unify the fact with another fact of the same type.
type Concrete = T
source§fn is_concrete(&self) -> bool
fn is_concrete(&self) -> bool
Returns whether the value is fully determined.
source§fn unify_with(&mut self, other: &Self) -> TractResult<bool>
fn unify_with(&mut self, other: &Self) -> TractResult<bool>
Tries to unify the fact with another fact of the same type and update
self. Read more
source§fn unify_with_mut(&mut self, other: &mut Self) -> TractResult<bool>
fn unify_with_mut(&mut self, other: &mut Self) -> TractResult<bool>
Tries to unify the fact with another fact of the same type and update
both of them. Read more
source§impl<'a> IntoExp<GenericFactoid<Arc<Tensor>>> for &'a ValueProxy
impl<'a> IntoExp<GenericFactoid<Arc<Tensor>>> for &'a ValueProxy
source§impl IntoExp<GenericFactoid<Arc<Tensor>>> for ValueProxy
impl IntoExp<GenericFactoid<Arc<Tensor>>> for ValueProxy
source§impl<'a> IntoExp<GenericFactoid<DatumType>> for &'a DatumType
impl<'a> IntoExp<GenericFactoid<DatumType>> for &'a DatumType
source§fn bex(self) -> Exp<TypeFactoid>
fn bex(self) -> Exp<TypeFactoid>
Converts the value to an Expression.
source§impl<'a> IntoExp<GenericFactoid<DatumType>> for &'a TypeProxy
impl<'a> IntoExp<GenericFactoid<DatumType>> for &'a TypeProxy
source§fn bex(self) -> Exp<TypeFactoid>
fn bex(self) -> Exp<TypeFactoid>
Converts the value to an Expression.
source§impl IntoExp<GenericFactoid<DatumType>> for DatumType
impl IntoExp<GenericFactoid<DatumType>> for DatumType
source§fn bex(self) -> Exp<TypeFactoid>
fn bex(self) -> Exp<TypeFactoid>
Converts the value to an Expression.
source§impl IntoExp<GenericFactoid<DatumType>> for TypeProxy
impl IntoExp<GenericFactoid<DatumType>> for TypeProxy
source§fn bex(self) -> Exp<TypeFactoid>
fn bex(self) -> Exp<TypeFactoid>
Converts the value to an Expression.
source§impl IntoExp<GenericFactoid<TDim>> for GenericFactoid<TDim>
impl IntoExp<GenericFactoid<TDim>> for GenericFactoid<TDim>
source§impl<'a> IntoExp<GenericFactoid<i64>> for &'a ElementProxy
impl<'a> IntoExp<GenericFactoid<i64>> for &'a ElementProxy
source§fn bex(self) -> Exp<IntFactoid>
fn bex(self) -> Exp<IntFactoid>
Converts the value to an Expression.
source§impl<'a> IntoExp<GenericFactoid<i64>> for &'a IntProxy
impl<'a> IntoExp<GenericFactoid<i64>> for &'a IntProxy
source§fn bex(self) -> Exp<IntFactoid>
fn bex(self) -> Exp<IntFactoid>
Converts the value to an Expression.
source§impl IntoExp<GenericFactoid<i64>> for IntFactoid
impl IntoExp<GenericFactoid<i64>> for IntFactoid
source§fn bex(self) -> Exp<IntFactoid>
fn bex(self) -> Exp<IntFactoid>
Converts the value to an Expression.
source§impl IntoExp<GenericFactoid<i64>> for i64
impl IntoExp<GenericFactoid<i64>> for i64
source§fn bex(self) -> Exp<IntFactoid>
fn bex(self) -> Exp<IntFactoid>
Converts the value to an Expression.
source§impl<T, R> Mul<R> for GenericFactoid<T>
impl<T, R> Mul<R> for GenericFactoid<T>
source§impl<T> Neg for GenericFactoid<T>
impl<T> Neg for GenericFactoid<T>
§type Output = GenericFactoid<T>
type Output = GenericFactoid<T>
The resulting type after applying the
-
operator.source§fn neg(self) -> GenericFactoid<T>
fn neg(self) -> GenericFactoid<T>
Performs the unary
-
operation. Read moresource§impl<T: PartialEq + Debug + Clone + PartialEq + Hash> PartialEq for GenericFactoid<T>
impl<T: PartialEq + Debug + Clone + PartialEq + Hash> PartialEq for GenericFactoid<T>
source§fn eq(&self, other: &GenericFactoid<T>) -> bool
fn eq(&self, other: &GenericFactoid<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T, R> Rem<R> for GenericFactoid<T>
impl<T, R> Rem<R> for GenericFactoid<T>
source§impl<T> Sub for GenericFactoid<T>
impl<T> Sub for GenericFactoid<T>
§type Output = GenericFactoid<T>
type Output = GenericFactoid<T>
The resulting type after applying the
-
operator.source§impl TExp<GenericFactoid<TDim>> for IntoDimExp
impl TExp<GenericFactoid<TDim>> for IntoDimExp
source§impl<T> Zero for GenericFactoid<T>
impl<T> Zero for GenericFactoid<T>
impl<T: Copy + Clone + Debug + PartialEq + Hash> Copy for GenericFactoid<T>
impl<T: Eq + Debug + Clone + PartialEq + Hash> Eq for GenericFactoid<T>
impl<T: Debug + Clone + PartialEq + Hash> StructuralPartialEq for GenericFactoid<T>
Auto Trait Implementations§
impl<T> Freeze for GenericFactoid<T>where
T: Freeze,
impl<T> RefUnwindSafe for GenericFactoid<T>where
T: RefUnwindSafe,
impl<T> Send for GenericFactoid<T>where
T: Send,
impl<T> Sync for GenericFactoid<T>where
T: Sync,
impl<T> Unpin for GenericFactoid<T>where
T: Unpin,
impl<T> UnwindSafe for GenericFactoid<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn 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
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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
.source§fn as_any(&self) -> &(dyn Any + 'static)
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.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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