pub struct Splice {
pub when_sampled: Vec<TokenId>,
pub backtrack: u32,
pub ff_tokens: Vec<TokenId>,
}Expand description
Describes what to do after sampling.
Fields§
§when_sampled: Vec<TokenId>If one of the tokens in when_sampled is sampled, this sequence is appended. When empty, this sequence is appended unconditionally, regardless of sampling.
backtrack: u32Backtrack this much before appending this sequence (this includes sampled token if any).
ff_tokens: Vec<TokenId>Append these tokens after backtracking.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Splice
impl<'de> Deserialize<'de> for Splice
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 Splice
impl RefUnwindSafe for Splice
impl Send for Splice
impl Sync for Splice
impl Unpin for Splice
impl UnwindSafe for Splice
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