Struct polar_core::resource_block::ShorthandRule
source · [−]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
sourceimpl ShorthandRule
impl ShorthandRule
pub fn as_rule(
&self,
resource_name: &Term,
blocks: &ResourceBlocks
) -> PolarResult<Rule>
Trait Implementations
sourceimpl Clone for ShorthandRule
impl Clone for ShorthandRule
sourcefn clone(&self) -> ShorthandRule
fn clone(&self) -> ShorthandRule
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ShorthandRule
impl Debug for ShorthandRule
sourceimpl Hash for ShorthandRule
impl Hash for ShorthandRule
sourceimpl PartialEq<ShorthandRule> for ShorthandRule
impl PartialEq<ShorthandRule> for ShorthandRule
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ShorthandRule) -> bool
fn ne(&self, other: &ShorthandRule) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more