pub struct ResearchTopic {
pub id: String,
pub name: String,
pub description: String,
pub parent_topic_id: Option<String>,
pub depth: u32,
pub priority: f32,
pub created_at: String,
}Fields§
§id: String§name: String§description: String§parent_topic_id: Option<String>§depth: u32§priority: f32§created_at: StringImplementations§
Source§impl ResearchTopic
impl ResearchTopic
pub fn new(name: String) -> Self
Sourcepub fn new_subtopic(name: String, parent: &ResearchTopic) -> Self
pub fn new_subtopic(name: String, parent: &ResearchTopic) -> Self
Create a sub-topic under parent, setting parent_topic_id and computing
depth from the parent. This is the single source of truth for the depth
rule, so the CLI and tests cannot diverge from it.
Trait Implementations§
Source§impl Clone for ResearchTopic
impl Clone for ResearchTopic
Source§fn clone(&self) -> ResearchTopic
fn clone(&self) -> ResearchTopic
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 ResearchTopic
impl Debug for ResearchTopic
Source§impl<'de> Deserialize<'de> for ResearchTopic
impl<'de> Deserialize<'de> for ResearchTopic
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 ResearchTopic
impl RefUnwindSafe for ResearchTopic
impl Send for ResearchTopic
impl Sync for ResearchTopic
impl Unpin for ResearchTopic
impl UnsafeUnpin for ResearchTopic
impl UnwindSafe for ResearchTopic
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