#[repr(C)]pub struct ComponentDesc { /* private fields */ }
Expand description
Contains enough information to construct, erase, and de-erase a component key.
Implementations§
Source§impl ComponentDesc
impl ComponentDesc
Sourcepub fn path_last(&self) -> String
pub fn path_last(&self) -> String
The last segment of the component path. Do not use this as a unique identifier; use Self::path instead.
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
A human-friendly name, if available. Corresponds to the Name attribute.
Sourcepub fn description(&self) -> Option<String>
pub fn description(&self) -> Option<String>
A human-friendly description, if available. Corresponds to the Description attribute.
pub fn type_name(&self) -> &'static str
pub fn type_id(&self) -> TypeId
pub fn has_attribute<A: ComponentAttribute>(&self) -> bool
pub fn attribute<A: ComponentAttribute>(&self) -> Option<AttributeGuard<A>>
pub fn attributes(&self) -> AttributeStoreGuard
pub fn attributes_mut(&self) -> AttributeStoreGuardMut
pub fn as_debug<'a>(&self, value: &'a dyn Any) -> &'a dyn Debug
pub fn index(&self) -> u32
pub fn from_json(&self, value: &str) -> Result<ComponentEntry, Error>
Sourcepub fn to_json(&self, value: &ComponentEntry) -> Result<String, Error>
pub fn to_json(&self, value: &ComponentEntry) -> Result<String, Error>
Converts the value to json
pub fn create_buffer(&self) -> Box<dyn IComponentBuffer>
Trait Implementations§
Source§impl Clone for ComponentDesc
impl Clone for ComponentDesc
Source§fn clone(&self) -> ComponentDesc
fn clone(&self) -> ComponentDesc
Returns a copy 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 Debug for ComponentDesc
impl Debug for ComponentDesc
Source§impl<'de> Deserialize<'de> for ComponentDesc
impl<'de> Deserialize<'de> for ComponentDesc
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: 'static> From<Component<T>> for ComponentDesc
impl<T: 'static> From<Component<T>> for ComponentDesc
Source§impl<T: 'static> From<ComponentDesc> for Component<T>
impl<T: 'static> From<ComponentDesc> for Component<T>
Source§fn from(value: ComponentDesc) -> Self
fn from(value: ComponentDesc) -> Self
Converts to this type from the input type.
Source§impl Hash for ComponentDesc
impl Hash for ComponentDesc
Source§impl Ord for ComponentDesc
impl Ord for ComponentDesc
Source§impl<T> PartialEq<Component<T>> for ComponentDesc
impl<T> PartialEq<Component<T>> for ComponentDesc
Source§impl<T> PartialEq<ComponentDesc> for Component<T>
impl<T> PartialEq<ComponentDesc> for Component<T>
Source§impl PartialEq for ComponentDesc
impl PartialEq for ComponentDesc
Source§impl PartialOrd for ComponentDesc
impl PartialOrd for ComponentDesc
Source§impl Serialize for ComponentDesc
impl Serialize for ComponentDesc
impl Copy for ComponentDesc
impl Eq for ComponentDesc
Auto Trait Implementations§
impl Freeze for ComponentDesc
impl RefUnwindSafe for ComponentDesc
impl Send for ComponentDesc
impl Sync for ComponentDesc
impl Unpin for ComponentDesc
impl UnwindSafe for ComponentDesc
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> ComponentValueBase for T
impl<T> ComponentValueBase for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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