Skip to main content

PollBody

Enum PollBody 

Source
pub enum PollBody {
    Light,
    Citizen(Path),
}
Expand description

WHO runs one poll entry’s ticks — the two roads a clock’s mandatory body word names.

§A closed vocabulary, so an enum

The house rule, and this seat is where it had been paid for with an Option<syn::Path> instead. None meant the entry wrote light rather than nothing is known, which the grammar guarantees with three refusals — an entry naming neither word, an entry naming both, and a light entry in a detached mode — so no unstated state ever reached the model. What the Option cost was that the guarantee lived in a comment: a reader of the field had to be told which of two meanings the empty case carried, and a caller writing entry.handler.is_none() was spelling light in a way nothing checked.

The arms say it instead. Light is a WORD and not an absence, and Citizen carries the one thing the other road has to name.

Variants§

§

Light

The bare light — the tick runs a <Node>Sweeps method on the node’s own operator, which the driver lends for the call and takes back.

§

Citizen(Path)

handler = "app::PromScraper" — a CITIZEN the deployment builds, ticked through its own face.

A PATH for Grant::node’s reason: nothing here can resolve it, the type being the application’s, and the compiler resolves it where the expansion lands.

Implementations§

Source§

impl PollBody

Source

pub const fn citizen(&self) -> Option<&Path>

The citizen this body mounts, or None where it is the operator’s own.

The accessor every consumer spends, so the match on the arms is written once. Its shape is the old field’s on purpose — what changed is that the empty case now has a NAME at the seat that decides it, rather than a paragraph at the seat that stored it.

Source

pub const fn mounted(&self) -> bool

Whether this body is a mounted citizen — the presence split’s own question, asked of the body.

Trait Implementations§

Source§

impl Clone for PollBody

Source§

fn clone(&self) -> Self

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 Debug for PollBody

Source§

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

Formats the value using the given formatter. Read more

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 = !

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.