diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-15 22:51:55 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-15 23:11:20 +0100 |
| commit | b6202b646a0d5ecced301d9bac8bfcaf977d7ee4 (patch) | |
| tree | 7d42cb50f9e66153e7e8b2217009684e25f54f42 /library/src/math/matrix.rs | |
| parent | f3980c704544a464f9729cc8bc9f97d3a7454769 (diff) | |
Reflection for castables
Diffstat (limited to 'library/src/math/matrix.rs')
| -rw-r--r-- | library/src/math/matrix.rs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/library/src/math/matrix.rs b/library/src/math/matrix.rs index 2d32f4b5..21294b71 100644 --- a/library/src/math/matrix.rs +++ b/library/src/math/matrix.rs @@ -1,6 +1,8 @@ use super::*; /// A column vector. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -52,17 +54,19 @@ pub enum Delimiter { castable! { Delimiter, - Expected: "type of bracket or bar", - Value::Str(s) => match s.as_str() { - "(" => Self::Paren, - "[" => Self::Bracket, - "{" => Self::Brace, - "|" => Self::Bar, - _ => Err("expected \"(\", \"[\", \"{\", or \"|\"")?, - }, + /// Delimit matrices with parentheses. + "(" => Self::Paren, + /// Delimit matrices with brackets. + "[" => Self::Bracket, + /// Delimit matrices with curly braces. + "{" => Self::Brace, + /// Delimit matrices with vertical bars. + "|" => Self::Bar, } /// A case distinction. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] |
