Added dimensions enum.#387
Conversation
|
Not sure how I feel about the name "namespaced_id". We call it "name" everywhere else, but I think namespaced id makes more sense. But I do think that consistency is VERY important. So we need to make a choice here. What do you think @Defman |
|
I'll fix it tomorrow 😃 |
Well, I think you are right. Here we have the problem of consistency and the problem of misleading names. |
pub trait NameSpace {
// Possible `Cow<'static, str>`, if not all namespaces are know at compile time
fn name(&self) -> &'static str;
// or
fn id(&slef) -> &'static str;
fn from_name(name: &str) -> Self;
// or
fn from_id(name: &str) -> Self;
} |
Defman
left a comment
There was a problem hiding this comment.
I think we should revisit the idea of a general NameSpace trait in the future. For now we will merge and we can open an issue regarding consistency of through a shared NameSpace trait.
Sounds good! |
|
I think this is ready for merging. |
ambeeeeee
left a comment
There was a problem hiding this comment.
Looks good for feather in its current state.
Implemented enum for dimensions
Created the functions to get the
dim_idand thenamespaced_id.Implemented TryFrom and Into traits, to serialize and deserialize using the
namespaced_id.Closes #386