pub enum FieldValue {
Text(String),
Nodes(List<u32>),
}Expand description
The value to set for a metadata field.
Accepts plain text or a list of node IDs via named constructors:
FieldValue::from("hello") // plain text
FieldValue::from("red") // single option
FieldValue::from(42u32) // single node ID
FieldValue::from([1u32, 2, 3]) // multiple node IDsWhen constructed from node IDs, the nodevalues parameter is
automatically set to true.
Variants§
Text(String)
A plain text value e.g. “hello”
Nodes(List<u32>)
A list of node IDs, sets nodevalues = true automatically
Trait Implementations§
Source§impl Clone for FieldValue
impl Clone for FieldValue
Source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldValue
impl Debug for FieldValue
Source§impl From<&str> for FieldValue
impl From<&str> for FieldValue
Source§impl From<String> for FieldValue
impl From<String> for FieldValue
Source§impl From<u32> for FieldValue
impl From<u32> for FieldValue
Source§impl PartialEq for FieldValue
impl PartialEq for FieldValue
Source§impl Serialize for FieldValue
impl Serialize for FieldValue
impl StructuralPartialEq for FieldValue
Auto Trait Implementations§
impl Freeze for FieldValue
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnsafeUnpin for FieldValue
impl UnwindSafe for FieldValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more