feat: keys
This commit is contained in:
1 parent
dddbcfd5e2
commit
584504feb7
10 files changed
+113
-94
No files matched your search
@@ -55,6 +55,18 @@ impl Component {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn key(&self) -> Option<&IfmtInput> {
|
||||
match self
|
||||
.fields
|
||||
.iter()
|
||||
.find(|f| f.name.to_string() == "key")
|
||||
.map(|f| &f.content)
|
||||
{
|
||||
Some(ContentField::Formatted(fmt)) => Some(fmt),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for Component {
|
||||
|
||||
Reference in new issue
Block a user