use alloc::sync::Arc;
use yggdrasil_abi::error::Error;

use crate::vfs::{Filename, NodeRef};

use super::object::KObject;

mod bytes;
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 string::{StringAttribute, StringAttributeOps};
