pub struct MSetAttr<A = i32> {
pub size: Range<A>,
pub occurrence: Range<A>,
pub representation: Option<String>,
}Fields§
§size: Range<A>§occurrence: Range<A>§representation: Option<String>Optional user-facing representation preference (short name), e.g. "repetition".
Written in Essence as mset (representation repetition) of …. When present, representation selection
heuristics default to this representation if it is applicable.
Implementations§
Source§impl<A> MSetAttr<A>
impl<A> MSetAttr<A>
pub fn new(size: Range<A>, occurrence: Range<A>) -> MSetAttr<A>
pub fn new_min_max_size(min: A, max: A) -> MSetAttr<A>
pub fn new_min_size(min: A) -> MSetAttr<A>
pub fn new_max_size(max: A) -> MSetAttr<A>
pub fn new_size(sz: A) -> MSetAttr<A>
Sourcepub fn with_representation(self, name: impl Into<String>) -> MSetAttr<A>
pub fn with_representation(self, name: impl Into<String>) -> MSetAttr<A>
Set the representation preference (Essence short name), returning the updated attributes.
Trait Implementations§
Source§impl<'de, A> Deserialize<'de> for MSetAttr<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for MSetAttr<A>where
A: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MSetAttr<A>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MSetAttr<A>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<A> Eq for MSetAttr<A>where
A: Eq,
Source§impl<B, C> FuncMap<B, C> for MSetAttr<B>
impl<B, C> FuncMap<B, C> for MSetAttr<B>
Source§fn func_map<F>(self, f: F) -> <MSetAttr<B> as FuncMap<B, C>>::Outputwhere
F: FnMut(B) -> C,
fn func_map<F>(self, f: F) -> <MSetAttr<B> as FuncMap<B, C>>::Outputwhere
F: FnMut(B) -> C,
Applies the closure
f to self in a functorial way§fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
fn func_map_over<Q, F>(self, f: F) -> Self::Outputwhere
F: FnMut(A) -> B,
Q: FuncMarker<P>,
Applies the closure
f to self in a functorial way, allowing explicit
specification of the marker type P Read moreSource§impl<A> Quine for MSetAttr<A>where
A: Quine,
impl<A> Quine for MSetAttr<A>where
A: Quine,
fn ctor_tokens(&self) -> TokenStream
Source§impl<A> Serialize for MSetAttr<A>where
A: Serialize,
impl<A> Serialize for MSetAttr<A>where
A: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<A> StructuralPartialEq for MSetAttr<A>where
A: PartialEq,
Auto Trait Implementations§
impl<A> Freeze for MSetAttr<A>
impl<A> RefUnwindSafe for MSetAttr<A>where
Range<A>: RefUnwindSafe,
impl<A> Send for MSetAttr<A>
impl<A> Sync for MSetAttr<A>
impl<A> Unpin for MSetAttr<A>
impl<A> UnsafeUnpin for MSetAttr<A>where
Range<A>: UnsafeUnpin,
impl<A> UnwindSafe for MSetAttr<A>where
Range<A>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.