Class: Kobako::Transport::Call

Inherits:
Data
  • Object
show all
Defined in:
lib/kobako/transport/call.rb,
sig/kobako/transport/call.rbs

Overview

One guest-initiated dispatch, as the native side decoded it off the core envelope. The routing fields arrive already decoded — a String for a bound constant's path, an Integer for a Capability Handle id — so the host resolves a target without interpreting a payload byte.

payload stays bytes here on purpose: routing never interprets a payload byte, and the one place that does — the Dispatcher — must decode it inside the Codec bracket that records whether a Handle crossed.

Built on the class X < Data.define(...) subclass form so the class body is fully Steep-visible; see .rubocop.yml for the rationale.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCall

Returns a new instance of Call.

Parameters:

  • target: (String, Integer)
  • method_name: (String)
  • block_given: (Boolean)
  • payload: (String)


12
# File 'sig/kobako/transport/call.rbs', line 12

def initialize: (target: String | Integer, method_name: String, block_given: bool, payload: String) -> void

Instance Attribute Details

#block_givenBoolean (readonly)

Returns the value of attribute block_given.

Returns:

  • (Boolean)


6
7
8
# File 'sig/kobako/transport/call.rbs', line 6

def block_given
  @block_given
end

#method_nameString (readonly)

Returns the value of attribute method_name.

Returns:

  • (String)


5
6
7
# File 'sig/kobako/transport/call.rbs', line 5

def method_name
  @method_name
end

#payloadString (readonly)

Returns the value of attribute payload.

Returns:

  • (String)


7
8
9
# File 'sig/kobako/transport/call.rbs', line 7

def payload
  @payload
end

#targetString, Integer (readonly)

Returns the value of attribute target.

Returns:

  • (String, Integer)


4
5
6
# File 'sig/kobako/transport/call.rbs', line 4

def target
  @target
end

Class Method Details

.new(target:, method_name:, block_given:, payload:) ⇒ Call .new(arg0, arg1, arg2, arg3) ⇒ Call

Overloads:

  • .new(target:, method_name:, block_given:, payload:) ⇒ Call

    Parameters:

    • target: (String, Integer)
    • method_name: (String)
    • block_given: (Boolean)
    • payload: (String)

    Returns:

  • .new(arg0, arg1, arg2, arg3) ⇒ Call

    Parameters:

    • arg0 (String, Integer)
    • arg1 (String)
    • arg2 (Boolean)
    • arg3 (String)

    Returns:



9
10
# File 'sig/kobako/transport/call.rbs', line 9

def self.new: (target: String | Integer, method_name: String, block_given: bool, payload: String) -> Call
| (String | Integer, String, bool, String) -> Call

Instance Method Details

#==Boolean

Parameters:

  • other (Object)

Returns:

  • (Boolean)


16
# File 'sig/kobako/transport/call.rbs', line 16

def ==: (untyped other) -> bool

#hashInteger

Returns:

  • (Integer)


18
# File 'sig/kobako/transport/call.rbs', line 18

def hash: () -> Integer

#withCall

Parameters:

  • target: (String, Integer)
  • method_name: (String)
  • block_given: (Boolean)
  • payload: (String)

Returns:



14
# File 'sig/kobako/transport/call.rbs', line 14

def with: (?target: String | Integer, ?method_name: String, ?block_given: bool, ?payload: String) -> Call