   /// in the generator for a given returned `UnicodeScalar` or an error.
   mutating func decode<
     G : Generator where G.Element == CodeUnit
-  >(inout next: G) -> UTFDecodeResult
+  >(inout next: G) -> UnicodeDecodingResult
 
   class func encode<
     S : Sink where S.Element == CodeUnit


  @public mutating func decode<
    G : Generator where G.Element == CodeUnit
  >(inout next: G) -> UTFDecodeResult {
    // If the EOF flag is not set, fill the lookahead buffer from the input
    // generator.
    if _lookaheadFlags & 0b1111_0000 == 0 {

  /// units than required for this scalar.
  mutating func _decodeOne<
    G : Generator where G.Element == CodeUnit
  >(inout input: G) -> (UnicodeDecodingResult, Int) {
    let result = decode(&input)
    switch result {
    case .Result(let us):
