pub struct RenderPayload {
pub input: PromptInput,
pub body: PromptBody,
pub message: String,
pub hint: Option<String>,
pub placeholder: Option<String>,
}
Expand description
A struct representing the payload required for prompt rendering.
Fields§
§input: PromptInput
§body: PromptBody
§message: String
§hint: Option<String>
§placeholder: Option<String>
Implementations§
Source§impl RenderPayload
impl RenderPayload
Sourcepub fn new(
message: String,
hint: Option<String>,
placeholder: Option<String>,
) -> Self
pub fn new( message: String, hint: Option<String>, placeholder: Option<String>, ) -> Self
Creates a new RenderPayload
.
Sourcepub fn input(self, input: PromptInput) -> Self
pub fn input(self, input: PromptInput) -> Self
Sets the input for the payload.
Sourcepub fn body(self, body: PromptBody) -> Self
pub fn body(self, body: PromptBody) -> Self
Sets the body for the payload.
Trait Implementations§
Source§impl Debug for RenderPayload
impl Debug for RenderPayload
Source§impl Default for RenderPayload
impl Default for RenderPayload
Source§fn default() -> RenderPayload
fn default() -> RenderPayload
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderPayload
impl RefUnwindSafe for RenderPayload
impl Send for RenderPayload
impl Sync for RenderPayload
impl Unpin for RenderPayload
impl UnwindSafe for RenderPayload
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