struct
CryBase::CouchBase::Services::KV::Response
- CryBase::CouchBase::Services::KV::Response
- Struct
- Value
- Object
Overview
One decoded inbound packet from the KV service. Produced by
ResponseReader#read.
resp = KV::Response.new(
opcode: KV::Opcode::Get.value,
status: KV::Status::Success,
cas: 0_u64,
extras: Bytes.empty,
key: "",
value: "world".to_slice,
)
resp.success? # => true
String.new(resp.value) # => "world"
Defined in:
crybase/couchbase/services/kv/response.cr:17crybase/couchbase/services/kv/response.cr:25
Constructors
Instance Method Summary
- #cas : UInt64
- #clone
- #copy_with(opcode _opcode = @opcode, status _status = @status, cas _cas = @cas, extras _extras = @extras, key _key = @key, value _value = @value)
- #extras : Bytes
- #key : String
- #opcode : UInt8
- #status : Status
- #success? : Bool
- #value : Bytes
Constructor Detail
def self.new(opcode : UInt8, status : Status, cas : UInt64, extras : Bytes, key : String, value : Bytes)
#
Instance Method Detail
def copy_with(opcode _opcode = @opcode, status _status = @status, cas _cas = @cas, extras _extras = @extras, key _key = @key, value _value = @value)
#