-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganized into /api,/api/internal,etc.
- Loading branch information
1 parent
c470e23
commit 8273dcc
Showing
49 changed files
with
348 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use hiallib::base::*; | ||
use hiallib::api::*; | ||
// use hiallib::c_api::*; | ||
// use std::ffi::CString; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use hiallib::base::*; | ||
use hiallib::api::*; | ||
use hiallib::pprint::pprint; | ||
|
||
// examples = "."^file/examples; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
use crate::{api::interpretation::*, api::*}; | ||
|
||
impl CellReaderTrait for HErr { | ||
fn ty(&self) -> Res<&str> { | ||
Ok(match self.kind { | ||
HErrKind::None => "nores", | ||
HErrKind::User => "user", | ||
HErrKind::IO => "io", | ||
HErrKind::Net => "net", | ||
HErrKind::Internal => "internal", | ||
HErrKind::ReadOnly => "readonly", | ||
HErrKind::CannotLock => "cannotlock", | ||
HErrKind::InvalidFormat => "invalidformat", | ||
}) | ||
} | ||
|
||
fn value(&self) -> Res<Value> { | ||
Err(self.clone()) | ||
} | ||
|
||
fn label(&self) -> Res<Value> { | ||
Err(self.clone()) | ||
} | ||
|
||
fn index(&self) -> Res<usize> { | ||
Err(self.clone()) | ||
} | ||
|
||
fn serial(&self) -> Res<String> { | ||
Err(self.clone()) | ||
} | ||
} | ||
|
||
impl CellWriterTrait for HErr { | ||
fn set_value(&mut self, value: OwnValue) -> Res<()> { | ||
Err(self.clone()) | ||
} | ||
} | ||
|
||
impl CellTrait for HErr { | ||
type Group = HErr; | ||
type CellReader = HErr; | ||
type CellWriter = HErr; | ||
|
||
fn interpretation(&self) -> &str { | ||
"error" | ||
} | ||
|
||
fn read(&self) -> Res<Self::CellReader> { | ||
Err(self.clone()) | ||
} | ||
|
||
fn write(&self) -> Res<Self::CellWriter> { | ||
Err(self.clone()) | ||
} | ||
|
||
fn head(&self) -> Res<(Self, Relation)> { | ||
nores() | ||
} | ||
} | ||
|
||
impl GroupTrait for HErr { | ||
type Cell = HErr; | ||
type CellIterator = std::iter::Empty<Res<HErr>>; | ||
|
||
fn label_type(&self) -> LabelType { | ||
LabelType { | ||
is_indexed: false, | ||
unique_labels: true, | ||
} | ||
} | ||
|
||
fn len(&self) -> Res<usize> { | ||
Ok(0) | ||
} | ||
|
||
fn at(&self, index: usize) -> Res<Self::Cell> { | ||
Err(self.clone()) | ||
} | ||
|
||
fn get_all(&self, label: Value<'_>) -> Res<Self::CellIterator> { | ||
Err(self.clone()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod elevation; | ||
pub mod error; | ||
pub mod field; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
mod error; | ||
mod internal; | ||
pub mod interpretation; | ||
mod relation; | ||
mod selector; | ||
mod value; | ||
mod xell; | ||
|
||
pub use error::*; | ||
pub use relation::*; | ||
pub use selector::*; | ||
pub use value::*; | ||
pub use xell::*; | ||
|
||
pub use internal::elevation::{ElevationConstructor, ELEVATION_CONSTRUCTORS}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::base::value::*; | ||
use crate::api::value::*; | ||
use core::fmt::{self, Display}; | ||
use std::borrow::Borrow; | ||
|
||
|
File renamed without changes.
Oops, something went wrong.