Struct daml_lf::element::DamlVariant
source · [−]pub struct DamlVariant<'a> { /* private fields */ }Implementations
sourceimpl<'a> DamlVariant<'a>
impl<'a> DamlVariant<'a>
pub fn new(
name: Cow<'a, str>,
package_id: Cow<'a, str>,
module_path: Vec<Cow<'a, str>>,
fields: Vec<DamlField<'a>>,
type_params: Vec<DamlTypeVarWithKind<'a>>,
serializable: bool
) -> 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 fn type_params(&self) -> &[DamlTypeVarWithKind<'a>]
pub const fn serializable(&self) -> bool
Trait Implementations
sourceimpl<'a> Clone for DamlVariant<'a>
impl<'a> Clone for DamlVariant<'a>
sourcefn clone(&self) -> DamlVariant<'a>
fn clone(&self) -> DamlVariant<'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 DamlVariant<'a>
impl<'a> DamlVisitableElement<'a> for DamlVariant<'a>
fn accept(&'a self, visitor: &'a mut impl DamlElementVisitor)
sourceimpl<'a> Debug for DamlVariant<'a>
impl<'a> Debug for DamlVariant<'a>
sourceimpl<'a> IntoBoundedStatic for DamlVariant<'a>
impl<'a> IntoBoundedStatic for DamlVariant<'a>
type Static = DamlVariant<'static>
type Static = DamlVariant<'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 PartialEq<DamlData<'_>> for DamlVariant<'_>
impl PartialEq<DamlData<'_>> for DamlVariant<'_>
Convenience impl to compare a DamlData with a DamlVariant.
sourceimpl PartialEq<DamlVariant<'_>> for DamlData<'_>
impl PartialEq<DamlVariant<'_>> for DamlData<'_>
Convenience impl to compare a DamlVariant with a DamlData.
sourceimpl PartialEq<DamlVariant<'_>> for DamlVariant<'_>
impl PartialEq<DamlVariant<'_>> for DamlVariant<'_>
sourceimpl<'a> Serialize for DamlVariant<'a>
impl<'a> Serialize for DamlVariant<'a>
sourceimpl<'a> ToBoundedStatic for DamlVariant<'a>
impl<'a> ToBoundedStatic for DamlVariant<'a>
type Static = DamlVariant<'static>
type Static = DamlVariant<'static>
The target type is bounded by the 'static lifetime.
Auto Trait Implementations
impl<'a> RefUnwindSafe for DamlVariant<'a>
impl<'a> Send for DamlVariant<'a>
impl<'a> Sync for DamlVariant<'a>
impl<'a> Unpin for DamlVariant<'a>
impl<'a> UnwindSafe for DamlVariant<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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