pub struct Func<'a> {
pub func: &'a str,
pub script: Script<'a>,
/* private fields */
}
Expand description
A full function that has complicated arguments and attached scripts
Fields§
§func: &'a str
The function name
script: Script<'a>
Any script modifications of the function
Implementations§
Source§impl<'a> Func<'a>
impl<'a> Func<'a>
Sourcepub fn new<Arg>(func: &'a str, script: Script<'a>, arg: Arg) -> Selfwhere
Arg: Into<ScriptFunc<'a>>,
pub fn new<Arg>(func: &'a str, script: Script<'a>, arg: Arg) -> Selfwhere
Arg: Into<ScriptFunc<'a>>,
Create a new function with all attached parts
Sourcepub fn without_scripts<Arg>(func: &'a str, arg: Arg) -> Selfwhere
Arg: Into<ScriptFunc<'a>>,
pub fn without_scripts<Arg>(func: &'a str, arg: Arg) -> Selfwhere
Arg: Into<ScriptFunc<'a>>,
Create a new function without scripts
Sourcepub fn with_sub<Sub, Arg>(func: &'a str, sub: Sub, arg: Arg) -> Self
pub fn with_sub<Sub, Arg>(func: &'a str, sub: Sub, arg: Arg) -> Self
Create a new function with subscripts
Sourcepub fn with_super<Sup, Arg>(func: &'a str, sup: Sup, arg: Arg) -> Self
pub fn with_super<Sup, Arg>(func: &'a str, sup: Sup, arg: Arg) -> Self
Create a new function with superscripts
Sourcepub fn with_subsuper<Sub, Sup, Arg>(
func: &'a str,
sub: Sub,
sup: Sup,
arg: Arg,
) -> Self
pub fn with_subsuper<Sub, Sup, Arg>( func: &'a str, sub: Sub, sup: Sup, arg: Arg, ) -> Self
Create a new function with sub and superscripts
Sourcepub fn arg(&self) -> &ScriptFunc<'a>
pub fn arg(&self) -> &ScriptFunc<'a>
The function argument
Trait Implementations§
Source§impl<'a> From<Func<'a>> for ScriptFunc<'a>
impl<'a> From<Func<'a>> for ScriptFunc<'a>
impl<'a> Eq for Func<'a>
impl<'a> StructuralPartialEq for Func<'a>
Auto Trait Implementations§
impl<'a> Freeze for Func<'a>
impl<'a> RefUnwindSafe for Func<'a>
impl<'a> Send for Func<'a>
impl<'a> Sync for Func<'a>
impl<'a> Unpin for Func<'a>
impl<'a> UnwindSafe for Func<'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