pub enum RuleKind<'a> {
Map {
from: &'a Property,
to: &'a Field,
},
ArgumentMap {
from: String,
to: &'a Field,
},
Function {
from: Option<&'a Property>,
name: String,
to: Vec<&'a Field>,
},
ArgumentFunction {
from: String,
type_s: String,
name: String,
to: Vec<&'a Field>,
},
}Variants§
Implementations§
Source§impl<'a> RuleKind<'a>
impl<'a> RuleKind<'a>
pub fn from_name(&'a self) -> &'a str
pub fn from_name_singular(&'a self) -> &'a str
pub fn from(&self) -> &'a Property
pub fn is_function(&self) -> bool
pub fn get_type(&self) -> RustType
pub fn get_type_no_option(&self) -> RustType
pub fn get_argument(&self) -> String
pub fn get_argument_no_option(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RuleKind<'a>
impl<'a> RefUnwindSafe for RuleKind<'a>
impl<'a> Send for RuleKind<'a>
impl<'a> Sync for RuleKind<'a>
impl<'a> Unpin for RuleKind<'a>
impl<'a> UnwindSafe for RuleKind<'a>
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