Enum support::descriptor::FieldType
source · pub enum FieldType {
Base(BaseType),
Object(ObjectType),
Array(ArrayType),
}
Variants§
Implementations§
source§impl FieldType
impl FieldType
sourcepub fn as_base_mut(&mut self) -> Option<&mut BaseType>
pub fn as_base_mut(&mut self) -> Option<&mut BaseType>
Optionally returns mutable references to the inner fields if this is a FieldType::Base
, otherwise None
sourcepub fn as_base(&self) -> Option<&BaseType>
pub fn as_base(&self) -> Option<&BaseType>
Optionally returns references to the inner fields if this is a FieldType::Base
, otherwise None
sourcepub fn into_base(self) -> Result<BaseType, Self>
pub fn into_base(self) -> Result<BaseType, Self>
Returns the inner fields if this is a FieldType::Base
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_object_mut(&mut self) -> Option<&mut ObjectType>
pub fn as_object_mut(&mut self) -> Option<&mut ObjectType>
Optionally returns mutable references to the inner fields if this is a FieldType::Object
, otherwise None
sourcepub fn as_object(&self) -> Option<&ObjectType>
pub fn as_object(&self) -> Option<&ObjectType>
Optionally returns references to the inner fields if this is a FieldType::Object
, otherwise None
sourcepub fn into_object(self) -> Result<ObjectType, Self>
pub fn into_object(self) -> Result<ObjectType, Self>
Returns the inner fields if this is a FieldType::Object
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_array_mut(&mut self) -> Option<&mut ArrayType>
pub fn as_array_mut(&mut self) -> Option<&mut ArrayType>
Optionally returns mutable references to the inner fields if this is a FieldType::Array
, otherwise None
sourcepub fn as_array(&self) -> Option<&ArrayType>
pub fn as_array(&self) -> Option<&ArrayType>
Optionally returns references to the inner fields if this is a FieldType::Array
, otherwise None
sourcepub fn into_array(self) -> Result<ArrayType, Self>
pub fn into_array(self) -> Result<ArrayType, Self>
Returns the inner fields if this is a FieldType::Array
, otherwise returns back the enum in the Err
case of the result