pub struct DeclaredTraits {}Expand description
Tracks which traits are explicitly declared via #[facet(traits(...))].
When this is present, we skip all impls! checks and only generate
vtable entries for the declared traits.
Fields§
§display: boolDisplay trait declared
debug: boolDebug trait declared
clone: boolClone trait declared
copy: boolCopy trait declared (marker)
partial_eq: boolPartialEq trait declared
eq: boolEq trait declared (marker)
partial_ord: boolPartialOrd trait declared
ord: boolOrd trait declared
hash: boolHash trait declared
default: boolDefault trait declared
send: boolSend trait declared (marker)
sync: boolSync trait declared (marker)
unpin: boolUnpin trait declared (marker)
Implementations§
Source§impl DeclaredTraits
impl DeclaredTraits
Sourcepub fn parse_from_tokens(
tokens: &TokenStream,
errors: &mut Vec<CompileError>,
) -> DeclaredTraits
pub fn parse_from_tokens( tokens: &TokenStream, errors: &mut Vec<CompileError>, ) -> DeclaredTraits
Parse traits from a token stream like Debug, PartialEq, Clone, Send
Trait Implementations§
Source§impl Clone for DeclaredTraits
impl Clone for DeclaredTraits
Source§fn clone(&self) -> DeclaredTraits
fn clone(&self) -> DeclaredTraits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for DeclaredTraits
impl Default for DeclaredTraits
Source§fn default() -> DeclaredTraits
fn default() -> DeclaredTraits
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeclaredTraits
impl RefUnwindSafe for DeclaredTraits
impl Send for DeclaredTraits
impl Sync for DeclaredTraits
impl Unpin for DeclaredTraits
impl UnwindSafe for DeclaredTraits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more