pub struct DiscoveredUrl {
pub url: String,
pub text: String,
pub description: String,
pub relevance: f32,
pub recommended: bool,
pub category: String,
}Expand description
A discovered URL with AI-generated metadata.
Fields§
§url: StringThe URL.
text: StringLink text or title.
description: StringAI-generated description of what this URL likely contains.
relevance: f32Relevance to the prompt (0.0 - 1.0).
recommended: boolWhether this URL is recommended to visit.
category: StringCategory of the URL (navigation, content, external, etc.).
Implementations§
Source§impl DiscoveredUrl
impl DiscoveredUrl
Sourcepub fn with_details(
url: impl Into<String>,
text: impl Into<String>,
description: impl Into<String>,
relevance: f32,
category: impl Into<String>,
) -> Self
pub fn with_details( url: impl Into<String>, text: impl Into<String>, description: impl Into<String>, relevance: f32, category: impl Into<String>, ) -> Self
Create with full details.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn with_relevance(self, relevance: f32) -> Self
pub fn with_relevance(self, relevance: f32) -> Self
Set the relevance.
Sourcepub fn with_recommended(self, recommended: bool) -> Self
pub fn with_recommended(self, recommended: bool) -> Self
Set whether recommended.
Sourcepub fn with_category(self, category: impl Into<String>) -> Self
pub fn with_category(self, category: impl Into<String>) -> Self
Set the category.
Check if this is a navigation URL.
Sourcepub fn is_content(&self) -> bool
pub fn is_content(&self) -> bool
Check if this is a content URL.
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Check if this is an external URL.
Trait Implementations§
Source§impl Clone for DiscoveredUrl
impl Clone for DiscoveredUrl
Source§fn clone(&self) -> DiscoveredUrl
fn clone(&self) -> DiscoveredUrl
Returns a duplicate of the value. Read more
1.0.0 · 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 DiscoveredUrl
impl Debug for DiscoveredUrl
Source§impl Default for DiscoveredUrl
impl Default for DiscoveredUrl
Source§fn default() -> DiscoveredUrl
fn default() -> DiscoveredUrl
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DiscoveredUrl
impl<'de> Deserialize<'de> for DiscoveredUrl
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 Freeze for DiscoveredUrl
impl RefUnwindSafe for DiscoveredUrl
impl Send for DiscoveredUrl
impl Sync for DiscoveredUrl
impl Unpin for DiscoveredUrl
impl UnwindSafe for DiscoveredUrl
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