pub struct PromptProvenance { /* private fields */ }Expand description
Bounded source attribution retained through compilation.
Implementations§
Source§impl PromptProvenance
impl PromptProvenance
Sourcepub fn new(
provider_id: ContextProviderId,
source_kind: impl Into<String>,
locator: Option<String>,
) -> Result<Self, ProvenanceError>
pub fn new( provider_id: ContextProviderId, source_kind: impl Into<String>, locator: Option<String>, ) -> Result<Self, ProvenanceError>
Creates bounded explicit provenance.
§Errors
Returns an error for invalid source kind or locator text.
Sourcepub const fn provider_id(&self) -> &ContextProviderId
pub const fn provider_id(&self) -> &ContextProviderId
Returns the producing provider.
Sourcepub fn source_kind(&self) -> &str
pub fn source_kind(&self) -> &str
Returns canonical source category.
Trait Implementations§
Source§impl Clone for PromptProvenance
impl Clone for PromptProvenance
Source§fn clone(&self) -> PromptProvenance
fn clone(&self) -> PromptProvenance
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 PromptProvenance
impl Debug for PromptProvenance
Source§impl<'de> Deserialize<'de> for PromptProvenance
impl<'de> Deserialize<'de> for PromptProvenance
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 PromptProvenance
Source§impl Hash for PromptProvenance
impl Hash for PromptProvenance
Source§impl PartialEq for PromptProvenance
impl PartialEq for PromptProvenance
Source§impl Serialize for PromptProvenance
impl Serialize for PromptProvenance
impl StructuralPartialEq for PromptProvenance
Auto Trait Implementations§
impl Freeze for PromptProvenance
impl RefUnwindSafe for PromptProvenance
impl Send for PromptProvenance
impl Sync for PromptProvenance
impl Unpin for PromptProvenance
impl UnsafeUnpin for PromptProvenance
impl UnwindSafe for PromptProvenance
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