pub fn to_number(self) -> Result<Number, String> {
		match self {
			NumberOrHex::Number(n) => Ok(n),
			NumberOrHex::Hex(h) => {
				// FIXME #1377 this only supports `u64` since `BlockNumber`
				// is `As<u64>` we could possibly go with `u128`.
				let l = h.low_u64();
				if U256::from(l) != h {
					Err(format!("`{}` does not fit into the block number type.", h))
				} else {
					Ok(traits::As::sa(l))
				}
			},
		}
	}
/// Attempts to convert into concrete block number.
///
/// Fails in case hex number is too big.
Attempts to convert into concrete block number.
Fails in case hex number is too big.
Attempts to convert into concrete block number . Fails in case hex number is too big .
pub fn to_number(self) -> Result<Number, String> {
		match self {
			NumberOrHex::Number(n) => Ok(n),
			NumberOrHex::Hex(h) => {
				// FIXME #1377 this only supports `u64` since `BlockNumber`
				// is `As<u64>` we could possibly go with `u128`.
				let l = h.low_u64();
				if U256::from(l) != h {
					Err(format!("`{}` does not fit into the block number type.", h))
				} else {
					Ok(traits::As::sa(l))
				}
			},
		}
	}
pub fn to_number ( self ) -> Result < Number , String > { match self { NumberOrHex :: Number ( n ) => Ok ( n ) , NumberOrHex :: Hex ( h ) => { // FIXME #1377 this only supports `u64` since `BlockNumber` // is `As<u64>` we could possibly go with `u128`. let l = h . low_u64 ( ) ; if U256 :: from ( l ) != h { Err ( format ! ( " " h ) ) } else { Ok ( traits :: As :: sa ( l ) ) } } , } }
Attempts to convert into concrete block number.
Attempts to convert into concrete block number .
self
self