Struct polar_core::resource_block::ShorthandRule
source · pub struct ShorthandRule {
pub head: Term,
pub body: (Term, Option<(Term, Term)>),
}
Fields§
§head: Term
Term
is a String
. E.g., "member"
in "member" if "owner";
.
body: (Term, Option<(Term, Term)>)
The first Term
is the ‘implier’ String
, e.g., "owner"
in "member" if "owner";
. The
Option
is the optional ‘relation’ Symbol
and String
, e.g., on "parent"
in "member" if "owner" on "parent";
.
Implementations§
source§impl ShorthandRule
impl ShorthandRule
pub fn as_rule( &self, resource_name: &Term, blocks: &ResourceBlocks ) -> PolarResult<Rule>
Trait Implementations§
source§impl Clone for ShorthandRule
impl Clone for ShorthandRule
source§fn clone(&self) -> ShorthandRule
fn clone(&self) -> ShorthandRule
Returns a copy 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 ShorthandRule
impl Debug for ShorthandRule
source§impl Hash for ShorthandRule
impl Hash for ShorthandRule
source§impl PartialEq for ShorthandRule
impl PartialEq for ShorthandRule
source§fn eq(&self, other: &ShorthandRule) -> bool
fn eq(&self, other: &ShorthandRule) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ShorthandRule
impl StructuralEq for ShorthandRule
impl StructuralPartialEq for ShorthandRule
Auto Trait Implementations§
impl RefUnwindSafe for ShorthandRule
impl Send for ShorthandRule
impl Sync for ShorthandRule
impl Unpin for ShorthandRule
impl UnwindSafe for ShorthandRule
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