pub struct InputData {
pub text: String,
pub meta: Option<String>,
}
Expand description
The input struct to build the markov-strings corpus.
let data = vec![InputData {
text: "foo bar".to_string(),
meta: Some("serialized value".to_string())
}];
Implements impl From<String>
so you can do
let data: Vec<InputData> = vec!["foo bar".to_string()]
.iter()
.map(|s| s.to_owned().into())
.collect();
Fields§
§text: String
The required value from which the generator will build new strings
meta: Option<String>
An optional field can contain any serialized data that you may wish to retrieve later from the Result.refs
set
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InputData
impl<'de> Deserialize<'de> for InputData
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
impl Eq for InputData
impl StructuralPartialEq for InputData
Auto Trait Implementations§
impl Freeze for InputData
impl RefUnwindSafe for InputData
impl Send for InputData
impl Sync for InputData
impl Unpin for InputData
impl UnwindSafe for InputData
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