use super::*;
impl<N: Network> Cast<Address<N>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<Address<N>> {
self.to_field()?.cast()
}
}
impl<N: Network> Cast<Boolean<N>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<Boolean<N>> {
self.to_field()?.cast()
}
}
impl<N: Network> Cast<Field<N>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<Field<N>> {
self.to_field()
}
}
impl<N: Network> Cast<Group<N>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<Group<N>> {
self.to_field()?.cast()
}
}
impl<N: Network, I: IntegerType> Cast<Integer<N, I>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<Integer<N, I>> {
self.to_field()?.cast()
}
}
impl<N: Network> Cast<Scalar<N>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<Scalar<N>> {
self.to_field()?.cast()
}
}
impl<N: Network> Cast<IdentifierLiteral<N>> for IdentifierLiteral<N> {
#[inline]
fn cast(&self) -> Result<IdentifierLiteral<N>> {
Ok(*self)
}
}