Skip to content

Commit

Permalink
so that we dont have to reparse same documents
Browse files Browse the repository at this point in the history
  • Loading branch information
amitu committed Dec 8, 2024
1 parent ef97bde commit e047f8b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
2 changes: 2 additions & 0 deletions v0.5/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions v0.5/fastn-package/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ impl fastn_continuation::Continuation for State {
type Output = fastn_package::Package;
type Needed = Vec<String>;
// File name
type Found = Vec<(String, Option<String>)>;
type Found = Vec<(String, Option<fastn_section::Document>)>;

fn continue_after(self, _n: Vec<(String, Option<String>)>) -> fastn_continuation::Result<Self> {
fn continue_after(
self,
_n: Vec<(String, Option<fastn_section::Document>)>,
) -> fastn_continuation::Result<Self> {
todo!()
}
}
3 changes: 2 additions & 1 deletion v0.5/fastn-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ homepage.workspace = true

[dependencies]
serde_json.workspace = true
fastn-continuation.workspace = true
fastn-continuation.workspace = true
fastn-section.workspace = true
8 changes: 5 additions & 3 deletions v0.5/fastn-router/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ impl fastn_router::Router {
impl fastn_continuation::Continuation for State {
type Output = fastn_router::Router;
type Needed = Vec<String>;
// File name
type Found = Vec<(String, Option<String>)>;
type Found = Vec<(String, Option<fastn_section::Document>)>;

fn continue_after(self, _n: Self::Found) -> fastn_continuation::Result<Self> {
fn continue_after(
self,
_n: Vec<(String, Option<fastn_section::Document>)>,
) -> fastn_continuation::Result<Self> {
todo!()
}
}
1 change: 1 addition & 0 deletions v0.5/fastn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ homepage.workspace = true
[dependencies]
fastn-compiler.workspace = true
fastn-package.workspace = true
fastn-section.workspace = true
fastn-continuation.workspace = true
fastn-router.workspace = true
fastn-runtime.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion v0.5/fastn/src/commands/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl fastn::commands::Render {

impl fastn_continuation::Provider for &fastn::commands::Render {
type Needed = Vec<String>;
type Found = Vec<(String, Option<String>)>;
type Found = Vec<(String, Option<fastn_section::Document>)>;

fn provide(&self, _needed: Self::Needed) -> Self::Found {
todo!()
Expand Down
4 changes: 2 additions & 2 deletions v0.5/fastn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pub enum OutputRequested {
Data,
}

pub fn full_filler(_i: Vec<String>) -> Vec<(String, Option<String>)> {
pub fn full_filler(_i: Vec<String>) -> Vec<(String, Option<fastn_section::Document>)> {
todo!()
}

pub async fn full_filler_async(_i: Vec<String>) -> Vec<(String, Option<String>)> {
pub async fn full_filler_async(_i: Vec<String>) -> Vec<(String, Option<fastn_section::Document>)> {
todo!()
}

0 comments on commit e047f8b

Please sign in to comment.