pub struct AbilityTree {
pub abilities: HeapArrayVec<AbilityKind, MAX_CHILDREN_PER_NODE>,
}Expand description
One or more abilities.
This is the root of the Magic: the Gathering texts, and can represent on its own the full text box of a card.
Fields§
§abilities: HeapArrayVec<AbilityKind, MAX_CHILDREN_PER_NODE>Implementations§
Source§impl AbilityTree
impl AbilityTree
pub fn empty() -> AbilityTree
pub fn display_from_root<W: Write>( &self, output: &mut W, prefix: &str, ) -> Result<()>
pub fn from_oracle_text( oracle_text: &str, card_name: &str, ) -> Result<AbilityTree, BoseijuError>
Trait Implementations§
Source§impl AbilityTreeNode for AbilityTree
impl AbilityTreeNode for AbilityTree
Source§fn children(&self) -> ArrayVec<&dyn AbilityTreeNode, MAX_CHILDREN_PER_NODE>
fn children(&self) -> ArrayVec<&dyn AbilityTreeNode, MAX_CHILDREN_PER_NODE>
Get all of the nodes children, as abstract ability tree node. Read more
Source§fn display(&self, out: &mut TreeFormatter<'_>) -> Result<()>
fn display(&self, out: &mut TreeFormatter<'_>) -> Result<()>
Display the ability tree in a human readable manner into the given output. Read more
Source§fn node_tag(&self) -> &'static str
fn node_tag(&self) -> &'static str
The node tag is a simple one word string that indicates what kind of node it is. Read more
Source§fn node_description(&self) -> String
fn node_description(&self) -> String
The node name is more advanced version of the tag, and can allocate memory to dynamically
changed based on the nodes internals. Read more
Source§impl Clone for AbilityTree
impl Clone for AbilityTree
Source§fn clone(&self) -> AbilityTree
fn clone(&self) -> AbilityTree
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AbilityTree
impl Debug for AbilityTree
Source§impl Default for AbilityTree
impl Default for AbilityTree
Source§impl<'de> Deserialize<'de> for AbilityTree
impl<'de> Deserialize<'de> for AbilityTree
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DummyInit for AbilityTree
Available on crate feature parser only.
impl DummyInit for AbilityTree
Available on crate feature
parser only.fn dummy_init() -> Self
Source§impl PartialEq for AbilityTree
impl PartialEq for AbilityTree
Source§impl Serialize for AbilityTree
impl Serialize for AbilityTree
impl Eq for AbilityTree
impl StructuralPartialEq for AbilityTree
Auto Trait Implementations§
impl Freeze for AbilityTree
impl RefUnwindSafe for AbilityTree
impl Send for AbilityTree
impl Sync for AbilityTree
impl Unpin for AbilityTree
impl UnwindSafe for AbilityTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more