Struct binjs_meta::spec::Type [−][src]
pub struct Type { pub spec: TypeSpec, // some fields omitted }
Fields
spec: TypeSpec
Methods
impl Type
[src]
impl Type
pub fn or_null(&mut self) -> &mut Self
[src]
pub fn or_null(&mut self) -> &mut Self
pub fn with_spec(&mut self, spec: TypeSpec) -> &mut Self
[src]
pub fn with_spec(&mut self, spec: TypeSpec) -> &mut Self
pub fn with_type(&mut self, type_: Type) -> &mut Self
[src]
pub fn with_type(&mut self, type_: Type) -> &mut Self
pub fn spec(&self) -> &TypeSpec
[src]
pub fn spec(&self) -> &TypeSpec
pub fn spec_mut(&mut self) -> &mut TypeSpec
[src]
pub fn spec_mut(&mut self) -> &mut TypeSpec
pub fn is_optional(&self) -> bool
[src]
pub fn is_optional(&self) -> bool
pub fn named(name: &NodeName) -> TypeSpec
[src]
pub fn named(name: &NodeName) -> TypeSpec
Shorthand constructors.
pub fn sum(types: &[TypeSpec]) -> TypeSpec
[src]
pub fn sum(types: &[TypeSpec]) -> TypeSpec
pub fn string() -> TypeSpec
[src]
pub fn string() -> TypeSpec
pub fn number() -> TypeSpec
[src]
pub fn number() -> TypeSpec
pub fn bool() -> TypeSpec
[src]
pub fn bool() -> TypeSpec
pub fn void() -> TypeSpec
[src]
pub fn void() -> TypeSpec
pub fn offset() -> TypeSpec
[src]
pub fn offset() -> TypeSpec
An offset
type, holding a number of bytes in the binary file.
pub fn array(self) -> TypeSpec
[src]
pub fn array(self) -> TypeSpec
pub fn non_empty_array(self) -> TypeSpec
[src]
pub fn non_empty_array(self) -> TypeSpec
pub fn get_primitive(&self, spec: &Spec) -> Option<IsNullable<Primitive>>
[src]
pub fn get_primitive(&self, spec: &Spec) -> Option<IsNullable<Primitive>>
Trait Implementations
impl Clone for Type
[src]
impl Clone for Type
fn clone(&self) -> Type
[src]
fn clone(&self) -> Type
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Type
[src]
impl Debug for Type
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Type
[src]
impl PartialEq for Type
fn eq(&self, other: &Type) -> bool
[src]
fn eq(&self, other: &Type) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Type) -> bool
[src]
fn ne(&self, other: &Type) -> bool
This method tests for !=
.
impl Eq for Type
[src]
impl Eq for Type