您最多选择25个标签 标签必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

llama.native.llamagrammarelement.md 2.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # LLamaGrammarElement
  2. Namespace: LLama.Native
  3. An element of a grammar
  4. ```csharp
  5. public struct LLamaGrammarElement
  6. ```
  7. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [LLamaGrammarElement](./llama.native.llamagrammarelement.md)<br>
  8. Implements [IEquatable&lt;LLamaGrammarElement&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.iequatable-1)
  9. ## Fields
  10. ### **Type**
  11. The type of this element
  12. ```csharp
  13. public LLamaGrammarElementType Type;
  14. ```
  15. ### **Value**
  16. Unicode code point or rule ID
  17. ```csharp
  18. public uint Value;
  19. ```
  20. ## Constructors
  21. ### **LLamaGrammarElement(LLamaGrammarElementType, UInt32)**
  22. Construct a new LLamaGrammarElement
  23. ```csharp
  24. LLamaGrammarElement(LLamaGrammarElementType type, uint value)
  25. ```
  26. #### Parameters
  27. `type` [LLamaGrammarElementType](./llama.native.llamagrammarelementtype.md)<br>
  28. `value` [UInt32](https://docs.microsoft.com/en-us/dotnet/api/system.uint32)<br>
  29. ## Methods
  30. ### **IsCharElement()**
  31. ```csharp
  32. bool IsCharElement()
  33. ```
  34. #### Returns
  35. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  36. ### **ToString()**
  37. ```csharp
  38. string ToString()
  39. ```
  40. #### Returns
  41. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  42. ### **GetHashCode()**
  43. ```csharp
  44. int GetHashCode()
  45. ```
  46. #### Returns
  47. [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  48. ### **Equals(Object)**
  49. ```csharp
  50. bool Equals(object obj)
  51. ```
  52. #### Parameters
  53. `obj` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)<br>
  54. #### Returns
  55. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  56. ### **Equals(LLamaGrammarElement)**
  57. ```csharp
  58. bool Equals(LLamaGrammarElement other)
  59. ```
  60. #### Parameters
  61. `other` [LLamaGrammarElement](./llama.native.llamagrammarelement.md)<br>
  62. #### Returns
  63. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>