pub struct DamlVariant<'a> { /* private fields */ }Expand description
A Daml variant.
Implementations§
Source§impl<'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§
Source§impl<'a> Clone for DamlVariant<'a>
impl<'a> Clone for DamlVariant<'a>
Source§fn clone(&self) -> DamlVariant<'a>
fn clone(&self) -> DamlVariant<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> DamlVisitableElement<'a> for DamlVariant<'a>
impl<'a> DamlVisitableElement<'a> for DamlVariant<'a>
fn accept(&'a self, visitor: &'a mut impl DamlElementVisitor)
Source§impl<'a> Debug for DamlVariant<'a>
impl<'a> Debug for DamlVariant<'a>
Source§impl<'a> IntoBoundedStatic for DamlVariant<'a>
impl<'a> IntoBoundedStatic for DamlVariant<'a>
Source§type Static = DamlVariant<'static>
type Static = DamlVariant<'static>
The target type is bounded by the
'static lifetime.Source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
Convert an owned
T into an owned T such that T: 'static.Source§impl PartialEq<DamlData<'_>> for DamlVariant<'_>
Convenience impl to compare a DamlData with a DamlVariant.
impl PartialEq<DamlData<'_>> for DamlVariant<'_>
Convenience impl to compare a DamlData with a DamlVariant.
Source§impl PartialEq<DamlVariant<'_>> for DamlData<'_>
Convenience impl to compare a DamlVariant with a DamlData.
impl PartialEq<DamlVariant<'_>> for DamlData<'_>
Convenience impl to compare a DamlVariant with a DamlData.
Source§impl PartialEq<DamlVariant<'_>> for DamlVariant<'_>
impl PartialEq<DamlVariant<'_>> for DamlVariant<'_>
Source§impl<'a> Serialize for DamlVariant<'a>
impl<'a> Serialize for DamlVariant<'a>
Source§impl<'a> ToBoundedStatic for DamlVariant<'a>
impl<'a> ToBoundedStatic for DamlVariant<'a>
Auto Trait Implementations§
impl<'a> Freeze for DamlVariant<'a>
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more