fn parse_target_type(decoder: &mut Decoder) -> Result<TargetType> {
    use self::TargetType::*;

    Ok(match decoder.read_u8()? {
        0x00 => TypeParameterClass(decoder.read_u8()?),
        0x01 => TypeParameterMethod(decoder.read_u8()?),
        0x10 => SuperType(decoder.read_u16()?),
        0x11 => TypeParameterBoundClass {
            type_parameter: decoder.read_u8()?,
            bound_index: decoder.read_u8()?,
        },
        0x12 => TypeParameterBoundMethod {
            type_parameter: decoder.read_u8()?,
            bound_index: decoder.read_u8()?,
        },
        0x13 => EmptyField,
        0x14 => EmptyReturn,
        0x15 => EmptyReceiver,
        0x16 => FormalParameter(decoder.read_u8()?),
        0x17 => Throws(decoder.read_u16()?),
        0x40 => LocalVariable(parse_local_variable(decoder)?),
        0x41 => ResourceVariable(parse_local_variable(decoder)?),
        0x42 => Catch(decoder.read_u16()?),
        0x43 => OffsetInstanceOf(decoder.read_u16()?),
        0x44 => OffsetNew(decoder.read_u16()?),
        0x45 => OffsetNewRef(decoder.read_u16()?),
        0x46 => OffsetRef(decoder.read_u16()?),
        0x47 => TypeArgumentCast {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x48 => TypeArgumentConstructor {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x49 => TypeArgumentMethod {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x4A => TypeArgumentNewRef {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x4B => TypeArgumentRef {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },

        _ => return Err(Error::InvalidTargetType),
    })
}
/// Parses the target type of a type annotation
Parses the target type of a type annotation
Parses the target type of a type annotation
fn parse_target_type(decoder: &mut Decoder) -> Result<TargetType> {
    use self::TargetType::*;
    Ok(match decoder.read_u8()? {
        0x00 => TypeParameterClass(decoder.read_u8()?),
        0x01 => TypeParameterMethod(decoder.read_u8()?),
        0x10 => SuperType(decoder.read_u16()?),
        0x11 => TypeParameterBoundClass {
            type_parameter: decoder.read_u8()?,
            bound_index: decoder.read_u8()?,
        },
        0x12 => TypeParameterBoundMethod {
            type_parameter: decoder.read_u8()?,
            bound_index: decoder.read_u8()?,
        },
        0x13 => EmptyField,
        0x14 => EmptyReturn,
        0x15 => EmptyReceiver,
        0x16 => FormalParameter(decoder.read_u8()?),
        0x17 => Throws(decoder.read_u16()?),
        0x40 => LocalVariable(parse_local_variable(decoder)?),
        0x41 => ResourceVariable(parse_local_variable(decoder)?),
        0x42 => Catch(decoder.read_u16()?),
        0x43 => OffsetInstanceOf(decoder.read_u16()?),
        0x44 => OffsetNew(decoder.read_u16()?),
        0x45 => OffsetNewRef(decoder.read_u16()?),
        0x46 => OffsetRef(decoder.read_u16()?),
        0x47 => TypeArgumentCast {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x48 => TypeArgumentConstructor {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x49 => TypeArgumentMethod {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x4A => TypeArgumentNewRef {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        0x4B => TypeArgumentRef {
            offset: decoder.read_u16()?,
            type_argument: decoder.read_u8()?,
        },
        _ => return Err(Error::InvalidTargetType),
    })
}
fn parse_target_type ( decoder : & mut Decoder ) -> Result < TargetType > { use self :: TargetType :: * ; Ok ( match decoder . read_u8 ( ) ? { 0x00 => TypeParameterClass ( decoder . read_u8 ( ) ? ) , 0x01 => TypeParameterMethod ( decoder . read_u8 ( ) ? ) , 0x10 => SuperType ( decoder . read_u16 ( ) ? ) , 0x11 => TypeParameterBoundClass { type_parameter : decoder . read_u8 ( ) ? , bound_index : decoder . read_u8 ( ) ? , } , 0x12 => TypeParameterBoundMethod { type_parameter : decoder . read_u8 ( ) ? , bound_index : decoder . read_u8 ( ) ? , } , 0x13 => EmptyField , 0x14 => EmptyReturn , 0x15 => EmptyReceiver , 0x16 => FormalParameter ( decoder . read_u8 ( ) ? ) , 0x17 => Throws ( decoder . read_u16 ( ) ? ) , 0x40 => LocalVariable ( parse_local_variable ( decoder ) ? ) , 0x41 => ResourceVariable ( parse_local_variable ( decoder ) ? ) , 0x42 => Catch ( decoder . read_u16 ( ) ? ) , 0x43 => OffsetInstanceOf ( decoder . read_u16 ( ) ? ) , 0x44 => OffsetNew ( decoder . read_u16 ( ) ? ) , 0x45 => OffsetNewRef ( decoder . read_u16 ( ) ? ) , 0x46 => OffsetRef ( decoder . read_u16 ( ) ? ) , 0x47 => TypeArgumentCast { offset : decoder . read_u16 ( ) ? , type_argument : decoder . read_u8 ( ) ? , } , 0x48 => TypeArgumentConstructor { offset : decoder . read_u16 ( ) ? , type_argument : decoder . read_u8 ( ) ? , } , 0x49 => TypeArgumentMethod { offset : decoder . read_u16 ( ) ? , type_argument : decoder . read_u8 ( ) ? , } , 0x4A => TypeArgumentNewRef { offset : decoder . read_u16 ( ) ? , type_argument : decoder . read_u8 ( ) ? , } , 0x4B => TypeArgumentRef { offset : decoder . read_u16 ( ) ? , type_argument : decoder . read_u8 ( ) ? , } , _ => return Err ( Error :: InvalidTargetType ) , } ) }
Parses the target type of a type annotation
Parses the target type of a type annotation
decoder
&mut Decoder