anchor.diff:      {error, {format, Error}, State#state{req = undefined, req_ctx = undefined}}.
   
   
  +-spec do_list_buckets(binary(), optional(pos_integer()), optional(boolean()), #rpblistbucketsreq{}, #state{}) ->
  +                             {reply, tuple(), #state{}} |
  +                             {error, {format, iodata()}, #state{}}.
   do_list_buckets(Type, Timeout, true, Req, #state{client=C}=State) ->
       {ok, ReqId} = C:stream_list_buckets(none, Timeout, Type),
       {reply, {stream, ReqId}, State#state{req = Req, req_ctx = ReqId}};
  
positive.code:             error
      end.
  
  maybe_create_bucket_type(<<"default">>, Bucket) ->
      Bucket;
  maybe_create_bucket_type(Type, Bucket) when is_binary(Type) ->
  
negative.code:             {error, {format, Reason}, State}
      end.
  
  -spec check_bucket_type(optional(binary())) -> {ok, binary()} | error.
  check_bucket_type(undefined) -> {ok, <<"default">>};
  check_bucket_type(<<"default">>) -> {ok, <<"default">>};
  check_bucket_type(Type) ->
  