Enum ftd::PropertyValue
source · [−]pub enum PropertyValue {
Value {
value: Value,
},
Reference {
name: String,
kind: Kind,
},
Variable {
name: String,
kind: Kind,
},
}
Variants
Value
Fields
value: Value
Reference
Variable
Implementations
sourceimpl PropertyValue
impl PropertyValue
pub fn get_passed_by_variable(&self) -> Option<String>
pub fn set_reference(&mut self)
pub fn get_reference(&self) -> Option<String>
pub fn into_optional(self) -> Self
pub fn resolve_value(
line_number: usize,
value: &str,
expected_kind: Option<Kind>,
doc: &TDoc<'_>,
arguments: &Map<Kind>,
source: Option<TextSource>
) -> Result<PropertyValue>
pub fn kind(&self) -> Kind
sourcepub fn resolve(&self, line_number: usize, doc: &TDoc<'_>) -> Result<Value>
pub fn resolve(&self, line_number: usize, doc: &TDoc<'_>) -> Result<Value>
resolves all the internal fields too
pub fn partial_resolve(&self, line_number: usize, doc: &TDoc<'_>) -> Result<Value>
Trait Implementations
sourceimpl Clone for PropertyValue
impl Clone for PropertyValue
sourcefn clone(&self) -> PropertyValue
fn clone(&self) -> PropertyValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PropertyValue
impl Debug for PropertyValue
sourceimpl<'de> Deserialize<'de> for PropertyValue
impl<'de> Deserialize<'de> for PropertyValue
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<PropertyValue> for PropertyValue
impl PartialEq<PropertyValue> for PropertyValue
sourcefn eq(&self, other: &PropertyValue) -> bool
fn eq(&self, other: &PropertyValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for PropertyValue
impl Serialize for PropertyValue
impl StructuralPartialEq for PropertyValue
Auto Trait Implementations
impl RefUnwindSafe for PropertyValue
impl Send for PropertyValue
impl Sync for PropertyValue
impl Unpin for PropertyValue
impl UnwindSafe for PropertyValue
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