pub struct DynamicIdentity {
pub scope: Scope,
pub operation: DynamicOperation,
pub task_family: TaskFamily,
pub question: String,
pub labels: Vec<String>,
pub context: Vec<ContextField>,
pub output: DynamicOutputKind,
pub artifact: ArtifactId,
pub privacy: Vec<String>,
pub template: TemplateRef,
pub preprocessing: String,
}Expand description
The canonical request identity’s preimage (3.4): everything that can
change what a backend computes for a question. The request id, deadline,
cost cap and abstention policy are deliberately absent; they bound or
judge the computation, they do not define it. Its digest, tagged with
schema::DYNAMIC_QUESTION, is the DynamicRequestId.
Fields§
§scope: Scope§operation: DynamicOperation§task_family: TaskFamily§question: String§labels: Vec<String>§context: Vec<ContextField>§output: DynamicOutputKind§artifact: ArtifactId§privacy: Vec<String>§template: TemplateRef§preprocessing: StringImplementations§
Source§impl DynamicIdentity
impl DynamicIdentity
Sourcepub fn of(
q: &DynamicQuestion,
capability: &DynamicCapability,
) -> DynamicIdentity
pub fn of( q: &DynamicQuestion, capability: &DynamicCapability, ) -> DynamicIdentity
The identity of a request served under capability’s template and
preprocessing.
Sourcepub fn id(&self) -> Result<DynamicRequestId, CanonicalError>
pub fn id(&self) -> Result<DynamicRequestId, CanonicalError>
sha256(rustev.dynamic-question/1 || 0x00 || canonical bytes).
Trait Implementations§
Source§impl Clone for DynamicIdentity
impl Clone for DynamicIdentity
Source§impl Debug for DynamicIdentity
impl Debug for DynamicIdentity
Source§impl<'de> Deserialize<'de> for DynamicIdentity
impl<'de> Deserialize<'de> for DynamicIdentity
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 DynamicIdentity
Source§impl JsonSchema for DynamicIdentity
impl JsonSchema for DynamicIdentity
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DynamicIdentity
impl PartialEq for DynamicIdentity
Source§impl Serialize for DynamicIdentity
impl Serialize for DynamicIdentity
impl StructuralPartialEq for DynamicIdentity
Auto Trait Implementations§
impl Freeze for DynamicIdentity
impl RefUnwindSafe for DynamicIdentity
impl Send for DynamicIdentity
impl Sync for DynamicIdentity
impl Unpin for DynamicIdentity
impl UnsafeUnpin for DynamicIdentity
impl UnwindSafe for DynamicIdentity
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