1
0

feat: update highlevel

This commit is contained in:
2026-04-22 14:53:22 +08:00
parent fc2097560c
commit fed02ad9bc
3 changed files with 48 additions and 13 deletions

View File

@@ -167,17 +167,43 @@ pub struct Program {
impl TryFrom<Schema> for Program {
type Error = ParseProgramError;
fn try_from(value: Schema) -> std::result::Result<Self, Self::Error> {
fn try_from(value: Schema) -> Result<Self, Self::Error> {
Self::new(value)
}
}
impl Program {
/// Try creating Program from Schema.
pub fn new(schema: Schema) -> Result<Self, ParseProgramError> {
todo!()
}
}
impl Program {
/// Register this application.
///
/// If there is registration of this application,
/// this function will return error.
pub fn register(&mut self, scope: Scope) -> Result<(), ProgramError> {
todo!()
}
/// Unregister this application.
///
/// If there is no registration of this application,
/// this function will return error.
pub fn unregister(&mut self, scope: Scope) -> Result<(), ProgramError> {
todo!()
}
/// Check whether this application has been registered in given view.
///
/// Please note that this is a rough check and do not validate any data.
pub fn is_registered(&self, view: View) -> Result<bool, ProgramError> {
todo!()
}
}
// endregion
// region: Program Internals