Class Rumai::IXP::Struct::Field
In: lib/rumai/ixp/message.rb
Parent: Object

A field inside a Struct.

  • A field‘s value is considered to be:
    • array of format when counter && format.is_a? Class
    • raw byte string when counter && format.nil?

Field values are stored as instance variables inside a structure.

Methods

countee=   counter=   factory   load_9p   new   to_9p  

Classes and Modules

Module Rumai::IXP::Struct::Field::CounteeField
Module Rumai::IXP::Struct::Field::CounterField

Attributes

countee  [R] 
counter  [R] 
format  [R] 
name  [R] 

Public Class methods

Returns a Field class that best represents the given format.

aName:unique (among all fields in a struct) name for the field
aFormat:number of bytes, a class, or nil
aCounter:field which counts the length of this field‘s value

Public Instance methods

Sets the countee for this field (implying that this field counts the length of the given field).

Sets the counter for this field (implying that the length of this field is counted by the given field).

Populates this object with information taken from the given 9P2000 byte stream.

Transforms this object into a string of 9P2000 bytes.

[Validate]