[−][src]Enum moore_vhdl::konst2::AnyConst
A borrowed constant.
Variants
Integer(&'r IntegerConst<'t>)
Floating(&'r FloatingConst<'t>)
Implementations
impl<'r, 't> AnyConst<'r, 't>
[src]
pub fn as_const(self) -> &'r dyn Const2<'t>
[src]
Perform type erasure.
pub fn as_integer(self) -> Option<&'r IntegerConst<'t>>
[src]
Returns Some(k)
if the constant is Integer(k)
, None
otherwise.
pub fn as_floating(self) -> Option<&'r FloatingConst<'t>>
[src]
Returns Some(k)
if the constant is Floating(k)
, None
otherwise.
pub fn unwrap_integer(self) -> &'r IntegerConst<'t>
[src]
Returns an &IntegerConst
or panics if the constant is not Integer
.
pub fn unwrap_floating(self) -> &'r FloatingConst<'t>
[src]
Returns a &FloatingConst
or panics if the constant is not Floating
.
Trait Implementations
impl<'r, 't: 'r> Clone for AnyConst<'r, 't>
[src]
impl<'r, 't: 'r> Copy for AnyConst<'r, 't>
[src]
impl<'r, 't> Debug for AnyConst<'r, 't>
[src]
impl<'r, 't> Display for AnyConst<'r, 't>
[src]
impl<'r, 't: 'r> Eq for AnyConst<'r, 't>
[src]
impl<'r, 't, T: Const2<'t>> From<&'r T> for AnyConst<'r, 't>
[src]
impl<'r, 't: 'r> PartialEq<AnyConst<'r, 't>> for AnyConst<'r, 't>
[src]
fn eq(&self, other: &AnyConst<'r, 't>) -> bool
[src]
fn ne(&self, other: &AnyConst<'r, 't>) -> bool
[src]
impl<'r, 't: 'r> StructuralEq for AnyConst<'r, 't>
[src]
impl<'r, 't: 'r> StructuralPartialEq for AnyConst<'r, 't>
[src]
Auto Trait Implementations
impl<'r, 't> !RefUnwindSafe for AnyConst<'r, 't>
impl<'r, 't> !Send for AnyConst<'r, 't>
impl<'r, 't> !Sync for AnyConst<'r, 't>
impl<'r, 't> Unpin for AnyConst<'r, 't> where
't: 'r,
't: 'r,
impl<'r, 't> !UnwindSafe for AnyConst<'r, 't>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,