22 lines
532 B
Rust
22 lines
532 B
Rust
use alloc::sync::Arc;
|
|
use yggdrasil_abi::error::Error;
|
|
|
|
use crate::vfs::{Filename, NodeRef};
|
|
|
|
use super::object::KObject;
|
|
|
|
mod bytes;
|
|
mod integer;
|
|
mod string;
|
|
|
|
pub trait Attribute<D>: Sync + Send {
|
|
fn instantiate(&self, parent: &Arc<KObject<D>>) -> Result<NodeRef, Error>;
|
|
fn name(&self) -> &Filename;
|
|
}
|
|
|
|
pub use bytes::{BytesAttribute, BytesAttributeOps};
|
|
pub use integer::{
|
|
IntegerAttribute, IntegerAttributeFormat, IntegerAttributeOps, IntegerAttributeValue,
|
|
};
|
|
pub use string::{StringAttribute, StringAttributeOps};
|