pub struct RecommendationInput {
pub title: String,
pub summary: String,
pub labels: Vec<String>,
pub user_mode: Option<WorkflowMode>,
}Expand description
Bounded task information used to request optional semantic advice.
Fields§
§title: StringIssue or task title.
summary: StringShort, reviewed task summary; raw logs and repository contents are excluded.
labels: Vec<String>Validated issue labels, without user or repository identifiers.
user_mode: Option<WorkflowMode>Explicit user mode selection, if any.
Implementations§
Source§impl RecommendationInput
impl RecommendationInput
Sourcepub fn new(title: &str, summary: &str, labels: Vec<String>) -> Self
pub fn new(title: &str, summary: &str, labels: Vec<String>) -> Self
Construct a task input for local evaluation.
Sourcepub fn validate(&self) -> Result<(), RecommendationError>
pub fn validate(&self) -> Result<(), RecommendationError>
Validate bounds and reject obvious sensitive content before any provider call.
§Errors
Returns RecommendationError::InvalidInput for invalid or unsafe text.
Sourcepub fn decision_request(&self) -> Result<DecisionRequest, RecommendationError>
pub fn decision_request(&self) -> Result<DecisionRequest, RecommendationError>
Build the same fixed, provider-independent Choice/Score/Noul schema for every task.
§Errors
Returns an error if the input violates safety or size bounds.
Trait Implementations§
Source§impl Clone for RecommendationInput
impl Clone for RecommendationInput
Source§impl Debug for RecommendationInput
impl Debug for RecommendationInput
Source§impl<'de> Deserialize<'de> for RecommendationInput
impl<'de> Deserialize<'de> for RecommendationInput
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 Forget for RecommendationInput
impl Freeze for RecommendationInput
impl Move for RecommendationInput
impl RefUnwindSafe for RecommendationInput
impl Send for RecommendationInput
impl Sync for RecommendationInput
impl Unpin for RecommendationInput
impl UnsafeUnpin for RecommendationInput
impl UnwindSafe for RecommendationInput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more