pub enum Kind {
Show 17 variants
String {
caption: bool,
body: bool,
default: Option<String>,
is_reference: bool,
},
Object {
default: Option<String>,
is_reference: bool,
},
Integer {
default: Option<String>,
is_reference: bool,
},
Decimal {
default: Option<String>,
is_reference: bool,
},
Boolean {
default: Option<String>,
is_reference: bool,
},
Element,
Elements,
Message,
StringMessage,
IntMessage,
Record {
name: String,
default: Option<String>,
is_reference: bool,
},
OrType {
name: String,
is_reference: bool,
},
OrTypeWithVariant {
name: String,
variant: String,
is_reference: bool,
},
Map {
kind: Box<Kind>,
is_reference: bool,
},
List {
kind: Box<Kind>,
default: Option<String>,
is_reference: bool,
},
Optional {
kind: Box<Kind>,
is_reference: bool,
},
UI {
default: Option<(String, Header)>,
},
}
Variants
String
Object
Integer
Decimal
Boolean
Element
Elements
Message
StringMessage
IntMessage
Record
OrType
OrTypeWithVariant
Map
List
Optional
UI
Implementations
sourceimpl Kind
impl Kind
pub fn is_reference(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_decimal(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_boolean(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn is_list(&self) -> bool
pub fn is_record(&self) -> bool
pub fn to_string(&self, line_number: usize, doc_id: &str) -> Result<String>
pub fn to_value(&self, line_number: usize, doc_id: &str) -> Result<Value>
pub fn has_default_value(&self) -> bool
sourceimpl Kind
impl Kind
pub fn is_same_as(&self, other: &Self) -> bool
pub fn without_default(&self) -> Self
pub fn record(name: &str) -> Self
pub fn integer() -> Self
pub fn decimal() -> Self
pub fn boolean() -> Self
pub fn object() -> Self
pub fn string() -> Self
pub fn get_default_value_str(&self) -> Option<String>
pub fn set_default(self, default: Option<String>) -> Self
pub fn set_reference(self, is_reference: bool) -> Self
pub fn body() -> Self
pub fn optional(k: Self) -> Self
pub fn list(k: Self) -> Self
pub fn map(k: Self) -> Self
pub fn into_optional(self) -> Self
pub fn inner(&self) -> &Self
pub fn mut_inner(&mut self) -> &mut Self
pub fn list_kind(&self) -> &Self
pub fn string_any(&self) -> Self
pub fn read_section(
&self,
line_number: usize,
p1: &Header,
p1_caption: &Option<String>,
p1_body: &Option<(usize, String)>,
name: &str,
doc: &TDoc<'_>
) -> Result<PropertyValue>
pub fn from(
line_number: usize,
s: &str,
doc: &TDoc<'_>,
object_kind: Option<(&str, Self)>
) -> Result<Self>
pub fn for_variable(
line_number: usize,
s: &str,
default: Option<String>,
doc: &TDoc<'_>,
object_kind: Option<(&str, Self)>,
arguments: &Map<Kind>
) -> Result<Self>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Kind
impl<'de> Deserialize<'de> for Kind
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<Kind> for Kind
impl PartialEq<Kind> for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more