Skip to main content

PermutationAttr

Struct PermutationAttr 

Source
pub struct PermutationAttr<A = i32> {
    pub num_moved: Range<A>,
    pub representation: Option<String>,
}
Expand description

A permutation is inherently total and bijective by definition, so unlike partition or function, its only attribute is a size constraint on numMoved, the number of moved points (i.e. the points not fixed by the permutation) – confirmed against real Conjure’s own numMoved/minNumMoved/maxNumMoved keywords (real Conjure does not accept size/minSize/maxSize here, unlike set/relation/etc).

Fields§

§num_moved: Range<A>§representation: Option<String>

Optional user-facing representation preference (short name), e.g. "packed".

Written in Essence as permutation (representation packed, …). When present, representation selection heuristics default to this representation if it is applicable.

Implementations§

Source§

impl<A> PermutationAttr<A>

Source

pub fn with_representation(self, name: impl Into<String>) -> PermutationAttr<A>

Set the representation preference (Essence short name), returning the updated attributes.

Source§

impl PermutationAttr<IntVal>

Trait Implementations§

Source§

impl<A> Clone for PermutationAttr<A>
where A: Clone,

Source§

fn clone(&self) -> PermutationAttr<A>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A> Debug for PermutationAttr<A>
where A: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<A> Default for PermutationAttr<A>

Source§

fn default() -> PermutationAttr<A>

Returns the “default value” for a type. Read more
Source§

impl<'de, A> Deserialize<'de> for PermutationAttr<A>
where A: Deserialize<'de>,

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<PermutationAttr<A>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<A> Display for PermutationAttr<A>
where A: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<A> Eq for PermutationAttr<A>
where A: Eq,

Source§

impl From<PermutationAttr> for PermutationAttr<IntVal>

Source§

fn from(val: PermutationAttr) -> PermutationAttr<IntVal>

Converts to this type from the input type.
Source§

impl<B, C> FuncMap<B, C> for PermutationAttr<B>
where Range<B>: FuncMap<B, C, Output = Range<C>>, Option<String>: Sized,

Source§

type Output = PermutationAttr<C>

The output type of the functorial mapping Read more
Source§

fn func_map<F>(self, f: F) -> <PermutationAttr<B> as FuncMap<B, C>>::Output
where F: FnMut(B) -> C,

Applies the closure f to self in a functorial way
§

fn func_map_over<Q, F>(self, f: F) -> Self::Output
where 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 more
Source§

impl<A> Hash for PermutationAttr<A>
where A: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<A> PartialEq for PermutationAttr<A>
where A: PartialEq,

Source§

fn eq(&self, other: &PermutationAttr<A>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<A> Quine for PermutationAttr<A>
where A: Quine,

Source§

impl<A> Serialize for PermutationAttr<A>
where A: Serialize,

Source§

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
Source§

impl<A> StructuralPartialEq for PermutationAttr<A>
where A: PartialEq,

Source§

impl TryFrom<PermutationAttr<IntVal>> for PermutationAttr

Source§

type Error = DomainOpError

The type returned in the event of a conversion error.
Source§

fn try_from( val: PermutationAttr<IntVal>, ) -> Result<PermutationAttr, <PermutationAttr as TryFrom<PermutationAttr<IntVal>>>::Error>

Performs the conversion.
Source§

impl<B, C> TryFuncMap<B, C> for PermutationAttr<B>
where Range<B>: TryFuncMap<B, C, Output = Range<C>>, Option<String>: Sized,

Source§

type Output = PermutationAttr<C>

The output type of the functorial mapping Read more
Source§

fn try_func_map<E, F>( self, f: F, ) -> Result<<PermutationAttr<B> as TryFuncMap<B, C>>::Output, E>
where F: FnMut(B) -> Result<C, E>,

Tries to apply the closure f to self in a functorial way Read more
§

fn try_func_map_over<Q, E, F>(self, f: F) -> Result<Self::Output, E>
where F: FnMut(A) -> Result<B, E>, Q: FuncMarker<P>,

Tries to apply the closure f to self in a functorial way, allowing explicit specification of the marker type P Read more

Auto Trait Implementations§

§

impl<A> Freeze for PermutationAttr<A>
where Range<A>: Freeze,

§

impl<A> RefUnwindSafe for PermutationAttr<A>
where Range<A>: RefUnwindSafe,

§

impl<A> Send for PermutationAttr<A>
where Range<A>: Send,

§

impl<A> Sync for PermutationAttr<A>
where Range<A>: Sync,

§

impl<A> Unpin for PermutationAttr<A>
where Range<A>: Unpin,

§

impl<A> UnsafeUnpin for PermutationAttr<A>
where Range<A>: UnsafeUnpin,

§

impl<A> UnwindSafe for PermutationAttr<A>
where Range<A>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, A> IntoAst<A> for T
where T: Into<A>, A: Ast,

§

fn into_ast(self, _a: &A) -> A

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more

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.