Class: Codify::Rust::Types::Option
- Inherits:
-
Struct
- Object
- Struct
- Codify::Rust::Types::Option
show all
- Includes:
- Codify::Rust::Type
- Defined in:
- lib/codify/rust/types.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#defaultible?, #definition?, #each_subtype, #primitive?, #to_rust
Instance Attribute Details
#t ⇒ Object
Returns the value of attribute t
60
61
62
|
# File 'lib/codify/rust/types.rb', line 60
def t
@t
end
|
Class Method Details
.to_s ⇒ Object
63
|
# File 'lib/codify/rust/types.rb', line 63
def self.to_s() 'Codify::Rust::Types::Option' end
|
Instance Method Details
#flatten ⇒ Object
68
69
70
|
# File 'lib/codify/rust/types.rb', line 68
def flatten
t.is_a?(self.class) ? t : self
end
|
#to_s ⇒ Object
66
|
# File 'lib/codify/rust/types.rb', line 66
def to_s() "Option<#{t}>" end
|
#types ⇒ Object
65
|
# File 'lib/codify/rust/types.rb', line 65
def types() [t] end
|