Enum ScalarAffinity

Source
#[non_exhaustive]
#[repr(C)]
pub enum ScalarAffinity {
Show 14 variants Number(NumberAffinity), ComplexNumber(ComplexNumberAffinity), String(StringAffinity), Boolean(BoolAffinity), Empty(EmptyAffinity), SocketAddr(SocketAddrAffinity), IpAddr(IpAddrAffinity), UUID(UuidAffinity), ULID(UlidAffinity), Time(TimeAffinity), 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)

Number-like scalar affinity

§

ComplexNumber(ComplexNumberAffinity)

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

§

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)

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 ScalarAffinity

Source

pub const fn number() -> NumberAffinityBuilder

Returns a NumberAffinityBuilder

Source

pub const fn complex_number() -> ComplexNumberAffinityBuilder

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 uuid() -> UuidAffinityBuilder

Returns an UuidAffinityBuilder

Source

pub const fn ulid() -> UlidAffinityBuilder

Returns a UlidAffinityBuilder

Source

pub const fn time() -> TimeAffinityBuilder

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 Clone for ScalarAffinity

Source§

fn clone(&self) -> ScalarAffinity

Returns a copy 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 Debug for ScalarAffinity

Source§

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

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

impl Copy for ScalarAffinity

Auto Trait Implementations§

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.