Enum ScalarAffinity

Source
#[non_exhaustive]
#[repr(C)]
pub enum ScalarAffinity<'shape> {
Show 15 variants Number(NumberAffinity<'shape>), ComplexNumber(ComplexNumberAffinity<'shape>), String(StringAffinity), Boolean(BoolAffinity), Empty(EmptyAffinity), SocketAddr(SocketAddrAffinity), IpAddr(IpAddrAffinity), Url(UrlAffinity), UUID(UuidAffinity), ULID(UlidAffinity), Time(TimeAffinity<'shape>), Opaque(OpaqueAffinity), Other(OtherAffinity), Char(CharAffinity), Path(PathAffinity),
}
Expand description

Scalar affinity: what a scalar spiritually is: a number, a string, a bool, something else entirely?

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Number(NumberAffinity<'shape>)

Number-like scalar affinity

§

ComplexNumber(ComplexNumberAffinity<'shape>)

Complex-Number-like scalar affinity

§

String(StringAffinity)

String-like scalar affinity

§

Boolean(BoolAffinity)

Boolean scalar affinity

§

Empty(EmptyAffinity)

Empty scalar affinity

§

SocketAddr(SocketAddrAffinity)

Socket address scalar affinity

§

IpAddr(IpAddrAffinity)

IP Address scalar affinity

§

Url(UrlAffinity)

URL scalar affinity

§

UUID(UuidAffinity)

UUID or UUID-like identifier, containing 16 bytes of information

§

ULID(UlidAffinity)

ULID or ULID-like identifier, containing 16 bytes of information

§

Time(TimeAffinity<'shape>)

Timestamp or Datetime-like scalar affinity

§

Opaque(OpaqueAffinity)

Something you’re not supposed to look inside of

§

Other(OtherAffinity)

Other scalar affinity

§

Char(CharAffinity)

Character scalar affinity

§

Path(PathAffinity)

Path scalar affinity (file/disk paths)

Implementations§

Source§

impl<'shape> ScalarAffinity<'shape>

Source

pub const fn number() -> NumberAffinityBuilder<'shape>

Returns a NumberAffinityBuilder

Source

pub const fn complex_number() -> ComplexNumberAffinityBuilder<'shape>

Returns a ComplexNumberAffinityBuilder

Source

pub const fn string() -> StringAffinityBuilder

Returns a StringAffinityBuilder

Source

pub const fn boolean() -> BoolAffinityBuilder

Returns a BoolAffinityBuilder

Source

pub const fn empty() -> EmptyAffinityBuilder

Returns an EmptyAffinityBuilder

Source

pub const fn socket_addr() -> SocketAddrAffinityBuilder

Returns a SocketAddrAffinityBuilder

Source

pub const fn ip_addr() -> IpAddrAffinityBuilder

Returns an IpAddrAffinityBuilder

Source

pub const fn url() -> UrlAffinityBuilder

Returns a UrlAffinityBuilder

Source

pub const fn uuid() -> UuidAffinityBuilder

Returns an UuidAffinityBuilder

Source

pub const fn ulid() -> UlidAffinityBuilder

Returns a UlidAffinityBuilder

Source

pub const fn time() -> TimeAffinityBuilder<'shape>

Returns an TimeAffinityBuilder

Source

pub const fn opaque() -> OpaqueAffinityBuilder

Returns an OpaqueAffinityBuilder

Source

pub const fn other() -> OtherAffinityBuilder

Returns an OtherAffinityBuilder

Source

pub const fn char() -> CharAffinityBuilder

Returns a CharAffinityBuilder

Source

pub const fn path() -> PathAffinityBuilder

Returns a PathAffinityBuilder

Trait Implementations§

Source§

impl<'shape> Clone for ScalarAffinity<'shape>

Source§

fn clone(&self) -> ScalarAffinity<'shape>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'shape> Debug for ScalarAffinity<'shape>

Source§

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

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

impl<'shape> Copy for ScalarAffinity<'shape>

Auto Trait Implementations§

§

impl<'shape> Freeze for ScalarAffinity<'shape>

§

impl<'shape> RefUnwindSafe for ScalarAffinity<'shape>

§

impl<'shape> Send for ScalarAffinity<'shape>

§

impl<'shape> Sync for ScalarAffinity<'shape>

§

impl<'shape> Unpin for ScalarAffinity<'shape>

§

impl<'shape> UnwindSafe for ScalarAffinity<'shape>

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
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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.