Struct daml_lf::element::DamlChoice
source · [−]pub struct DamlChoice<'a> { /* private fields */ }Expand description
A Daml template choice.
Implementations
sourceimpl<'a> DamlChoice<'a>
impl<'a> DamlChoice<'a>
pub fn new(
name: Cow<'a, str>,
package_id: Cow<'a, str>,
module_path: Vec<Cow<'a, str>>,
fields: Vec<DamlField<'a>>,
return_type: DamlType<'a>,
consuming: bool,
self_binder: Cow<'a, str>,
update: DamlExpr<'a>,
controllers: DamlExpr<'a>,
observers: DamlExpr<'a>
) -> Self
pub fn new_with_default(
name: Cow<'a, str>,
package_id: Cow<'a, str>,
module_path: Vec<Cow<'a, str>>,
fields: Vec<DamlField<'a>>,
return_type: DamlType<'a>
) -> Self
pub fn name(&self) -> &str
pub fn package_id(&self) -> &str
pub fn module_path(&self) -> impl Iterator<Item = &str>
pub fn fields(&self) -> &[DamlField<'a>]
pub const fn return_type(&self) -> &DamlType<'a>
pub const fn consuming(&self) -> bool
pub fn self_binder(&self) -> &str
pub fn update(&self) -> &DamlExpr<'a>
pub fn controllers(&self) -> &DamlExpr<'a>
pub fn observers(&self) -> &DamlExpr<'a>
Trait Implementations
sourceimpl<'a> Clone for DamlChoice<'a>
impl<'a> Clone for DamlChoice<'a>
sourcefn clone(&self) -> DamlChoice<'a>
fn clone(&self) -> DamlChoice<'a>
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<'a> DamlVisitableElement<'a> for DamlChoice<'a>
impl<'a> DamlVisitableElement<'a> for DamlChoice<'a>
fn accept(&'a self, visitor: &'a mut impl DamlElementVisitor)
sourceimpl<'a> Debug for DamlChoice<'a>
impl<'a> Debug for DamlChoice<'a>
sourceimpl<'a> IntoBoundedStatic for DamlChoice<'a>
impl<'a> IntoBoundedStatic for DamlChoice<'a>
type Static = DamlChoice<'static>
type Static = DamlChoice<'static>
The target type is bounded by the 'static lifetime.
sourcefn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
Convert an owned T into an owned T such that T: 'static.
sourceimpl<'a> Serialize for DamlChoice<'a>
impl<'a> Serialize for DamlChoice<'a>
sourceimpl<'a> ToBoundedStatic for DamlChoice<'a>
impl<'a> ToBoundedStatic for DamlChoice<'a>
type Static = DamlChoice<'static>
type Static = DamlChoice<'static>
The target type is bounded by the 'static lifetime.
Auto Trait Implementations
impl<'a> RefUnwindSafe for DamlChoice<'a>
impl<'a> Send for DamlChoice<'a>
impl<'a> Sync for DamlChoice<'a>
impl<'a> Unpin for DamlChoice<'a>
impl<'a> UnwindSafe for DamlChoice<'a>
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