Struct clingo::Symbol [] [src]

pub struct Symbol(_);

Represents a symbol.

This includes numbers, strings, functions (including constants when arguments are empty and tuples when the name is empty), #inf and #sup.

Methods

impl Symbol
[src]

[src]

Construct a symbol representing a number.

[src]

Construct a symbol representing #sup.

[src]

Construct a symbol representing #inf

[src]

Construct a symbol representing a string.

Arguments

  • string - the string

Errors:

[src]

Construct a symbol representing an id.

Note: This is just a shortcut for create_function() with empty arguments.

Arguments

  • name - the name of the symbol
  • positive - whether the symbol has a classical negation sign

Errors

[src]

Construct a symbol representing a function or tuple.

Note: To create tuples, the empty string has to be used as name.

Arguments

  • name - the name of the function
  • arguments - the arguments of the function
  • positive - whether the symbol has a classical negation sign

Errors

[src]

Get the number of a symbol.

Errors

[src]

Get the name of a symbol.

Errors

[src]

Get the string of a symbol.

Errors

[src]

Check if a function is positive (does not have a sign).

Errors

[src]

Check if a function is negative (has a sign).

Errors

[src]

Get the arguments of a symbol.

Errors

[src]

Get the type of a symbol.

Errors

  • may failed to match clingo symbol type

[src]

Get the string representation of a symbol.

Errors

Trait Implementations

impl Debug for Symbol
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for Symbol
[src]

impl Clone for Symbol
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Symbol
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for Symbol
[src]

impl PartialOrd for Symbol
[src]

[src]

Compare two symbols.

Symbols are first compared by type. If the types are equal, the values are compared (where strings are compared using strcmp). Functions are first compared by signature and then lexicographically by arguments.

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for Symbol
[src]

[src]

Calculate a hash code of a symbol.

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Symbol

impl Sync for Symbol