pub struct PreparedInstruction {
pub text: String,
pub dynamic: bool,
pub metadata: Map<String, Value>,
}Expand description
Prepared instruction fragment attached to request parameters.
Fields§
§text: StringInstruction text.
dynamic: boolWhether this instruction came from a dynamic source.
metadata: Map<String, Value>Instruction metadata.
Implementations§
Source§impl PreparedInstruction
impl PreparedInstruction
Sourcepub fn static_text(text: impl Into<String>) -> Self
pub fn static_text(text: impl Into<String>) -> Self
Create a static instruction.
Sourcepub fn dynamic_text(text: impl Into<String>) -> Self
pub fn dynamic_text(text: impl Into<String>) -> Self
Create a dynamic instruction.
Sourcepub fn with_origin(self, origin: impl Into<String>) -> Self
pub fn with_origin(self, origin: impl Into<String>) -> Self
Attach instruction origin metadata.
Sourcepub fn with_dynamic(self, dynamic: bool) -> Self
pub fn with_dynamic(self, dynamic: bool) -> Self
Attach instruction dynamic metadata and update the typed dynamic flag.
Trait Implementations§
Source§impl Clone for PreparedInstruction
impl Clone for PreparedInstruction
Source§fn clone(&self) -> PreparedInstruction
fn clone(&self) -> PreparedInstruction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PreparedInstruction
impl Debug for PreparedInstruction
Source§impl<'de> Deserialize<'de> for PreparedInstruction
impl<'de> Deserialize<'de> for PreparedInstruction
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 PreparedInstruction
Source§impl PartialEq for PreparedInstruction
impl PartialEq for PreparedInstruction
Source§impl Serialize for PreparedInstruction
impl Serialize for PreparedInstruction
impl StructuralPartialEq for PreparedInstruction
Auto Trait Implementations§
impl Freeze for PreparedInstruction
impl RefUnwindSafe for PreparedInstruction
impl Send for PreparedInstruction
impl Sync for PreparedInstruction
impl Unpin for PreparedInstruction
impl UnsafeUnpin for PreparedInstruction
impl UnwindSafe for PreparedInstruction
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