Specs

Struct Specs 

Source
pub struct Specs {
    pub(crate) items: UnordMap<OwnerId, Item>,
    pub(crate) trait_items: UnordMap<OwnerId, TraitItemFn>,
    pub(crate) impl_items: UnordMap<OwnerId, ImplItemFn>,
    pub flux_items_by_parent: FxIndexMap<OwnerId, Vec<FluxItem>>,
    pub(crate) dummy_extern: UnordSet<LocalDefId>,
    pub(crate) extern_id_to_local_id: UnordMap<DefId, LocalDefId>,
    pub(crate) local_id_to_extern_id: UnordMap<LocalDefId, DefId>,
}

Fields§

§items: UnordMap<OwnerId, Item>§trait_items: UnordMap<OwnerId, TraitItemFn>§impl_items: UnordMap<OwnerId, ImplItemFn>§flux_items_by_parent: FxIndexMap<OwnerId, Vec<FluxItem>>§dummy_extern: UnordSet<LocalDefId>

Set of dummy items generated by the extern spec macro we must completely ignore. This is not the same as ignored items because, for ignored items, we still need to return errors for queries and handle them gracefully in order to report them at the use it.

If an item is in this set, all its descendants are also consider dummy (but they may not be in the set).

§extern_id_to_local_id: UnordMap<DefId, LocalDefId>§local_id_to_extern_id: UnordMap<LocalDefId, DefId>

Implementations§

Source§

impl Specs

Source

pub fn insert_extern_spec_id_mapping( &mut self, local_id: LocalDefId, extern_id: DefId, ) -> Result<(), ExternSpecMappingErr>

Source

pub fn insert_dummy(&mut self, def_id: LocalDefId)

Source

pub fn get_item(&self, owner_id: OwnerId) -> Option<&Item>

Source

pub fn insert_item(&mut self, owner_id: OwnerId, item: Item) -> Option<Item>

Source

pub fn get_trait_item(&self, owner_id: OwnerId) -> Option<&TraitItemFn>

Source

pub fn insert_trait_item( &mut self, owner_id: OwnerId, trait_item: TraitItemFn, ) -> Option<TraitItemFn>

Source

pub fn get_impl_item(&self, owner_id: OwnerId) -> Option<&ImplItemFn>

Source

pub fn insert_impl_item( &mut self, owner_id: OwnerId, impl_item: ImplItemFn, ) -> Option<ImplItemFn>

Trait Implementations§

Source§

impl Default for Specs

Source§

fn default() -> Specs

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

Auto Trait Implementations§

§

impl Freeze for Specs

§

impl RefUnwindSafe for Specs

§

impl Send for Specs

§

impl Sync for Specs

§

impl Unpin for Specs

§

impl UnwindSafe for Specs

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.

§

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.

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

impl<P> IntoQueryParam<P> for P

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

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