pub struct PublishConfig {
pub source: String,
pub target: String,
pub pretty: bool,
pub root_element: String,
}Expand description
Configuration for publish functions.
Specifies where to read the source data from and where to store the serialized result in the data context.
Fields§
§source: StringSource field name in data to serialize.
- “field_name” - Read from data.field_name
- “nested.field” - Read from data.nested.field
target: StringTarget field name in data where the serialized string will be stored.
The result is stored at data.{target}.
pretty: boolWhether to pretty-print the output (for JSON only). Defaults to false.
root_element: StringRoot element name for XML output. Defaults to “root”.
Implementations§
Trait Implementations§
Source§impl Clone for PublishConfig
impl Clone for PublishConfig
Source§fn clone(&self) -> PublishConfig
fn clone(&self) -> PublishConfig
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 PublishConfig
impl Debug for PublishConfig
Source§impl<'de> Deserialize<'de> for PublishConfig
impl<'de> Deserialize<'de> for PublishConfig
Source§fn 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
Auto Trait Implementations§
impl Freeze for PublishConfig
impl RefUnwindSafe for PublishConfig
impl Send for PublishConfig
impl Sync for PublishConfig
impl Unpin for PublishConfig
impl UnwindSafe for PublishConfig
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