Skip to main content

AlsoOn

Enum AlsoOn 

Source
pub enum AlsoOn {
    Method(&'static str, &'static [&'static str]),
    Leaf(&'static [&'static str]),
    Exact(&'static [&'static str]),
    FreeFn,
}
Expand description

How an AlsoEffect row names its paths — the two shapes the rule tables already use.

Variants§

§

Method(&'static str, &'static [&'static str])

(type, methods): the path’s second-to-last segment is type and its last is one of methods — the key b11_r1528 matches on, so a row here names exactly the spellings the primary rule beside it names.

§

Leaf(&'static [&'static str])

A free function: the path ends in ::<leaf> for one of these leaves.

§

Exact(&'static [&'static str])

These exact paths and no others — for a free function whose name a method of the same crate also ends in (tokio_postgres::connect against TlsConnect::connect), where a AlsoOn::Leaf tail would charge both.

§

FreeFn

A free function: every path segment after the crate name starts with a lower-case letter (fastrand::u32, fastrand::global_rng::u32), so no type’s method of the same name (fastrand::Rng::u32) matches, and neither does a trait-impl spelling such as fastrand::&Rng::eq (a segment that is not an identifier).

Implementations§

Source§

impl AlsoOn

Source

pub fn matches(&self, path: &str) -> bool

Auto Trait Implementations§

§

impl Forget for AlsoOn

§

impl Freeze for AlsoOn

§

impl Move for AlsoOn

§

impl RefUnwindSafe for AlsoOn

§

impl Send for AlsoOn

§

impl Sync for AlsoOn

§

impl Unpin for AlsoOn

§

impl UnsafeUnpin for AlsoOn

§

impl UnwindSafe for AlsoOn

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> 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, 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.