pub enum WebidlTypeRef {
Id(Id<WebidlCompoundType>),
Scalar(WebidlScalarType),
}
Variants§
Id(Id<WebidlCompoundType>)
Scalar(WebidlScalarType)
Implementations§
Source§impl WebidlTypeRef
impl WebidlTypeRef
Sourcepub fn id(&self) -> Option<Id<WebidlCompoundType>>
pub fn id(&self) -> Option<Id<WebidlCompoundType>>
Get this WebidlTypeRef
as an id of a WebidlCompoundType
, or None
if it is actually a scalar.
Sourcepub fn scalar(&self) -> Option<WebidlScalarType>
pub fn scalar(&self) -> Option<WebidlScalarType>
Get this WebidlTypeRef
as a WebidlScalarType
, or None
if it is
actually a compound type.
Trait Implementations§
Source§impl Clone for WebidlTypeRef
impl Clone for WebidlTypeRef
Source§fn clone(&self) -> WebidlTypeRef
fn clone(&self) -> WebidlTypeRef
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 Debug for WebidlTypeRef
impl Debug for WebidlTypeRef
Source§impl From<Id<WebidlCompoundType>> for WebidlTypeRef
impl From<Id<WebidlCompoundType>> for WebidlTypeRef
Source§fn from(i: Id<WebidlCompoundType>) -> Self
fn from(i: Id<WebidlCompoundType>) -> Self
Converts to this type from the input type.
Source§impl From<WebidlDictionaryId> for WebidlTypeRef
impl From<WebidlDictionaryId> for WebidlTypeRef
Source§fn from(x: WebidlDictionaryId) -> WebidlTypeRef
fn from(x: WebidlDictionaryId) -> WebidlTypeRef
Converts to this type from the input type.
Source§impl From<WebidlEnumerationId> for WebidlTypeRef
impl From<WebidlEnumerationId> for WebidlTypeRef
Source§fn from(x: WebidlEnumerationId) -> WebidlTypeRef
fn from(x: WebidlEnumerationId) -> WebidlTypeRef
Converts to this type from the input type.
Source§impl From<WebidlFunctionId> for WebidlTypeRef
impl From<WebidlFunctionId> for WebidlTypeRef
Source§fn from(x: WebidlFunctionId) -> WebidlTypeRef
fn from(x: WebidlFunctionId) -> WebidlTypeRef
Converts to this type from the input type.
Source§impl From<WebidlScalarType> for WebidlTypeRef
impl From<WebidlScalarType> for WebidlTypeRef
Source§fn from(s: WebidlScalarType) -> Self
fn from(s: WebidlScalarType) -> Self
Converts to this type from the input type.
Source§impl From<WebidlUnionId> for WebidlTypeRef
impl From<WebidlUnionId> for WebidlTypeRef
Source§fn from(x: WebidlUnionId) -> WebidlTypeRef
fn from(x: WebidlUnionId) -> WebidlTypeRef
Converts to this type from the input type.
Source§impl PartialEq for WebidlTypeRef
impl PartialEq for WebidlTypeRef
impl Copy for WebidlTypeRef
impl Eq for WebidlTypeRef
impl StructuralPartialEq for WebidlTypeRef
Auto Trait Implementations§
impl Freeze for WebidlTypeRef
impl RefUnwindSafe for WebidlTypeRef
impl Send for WebidlTypeRef
impl Sync for WebidlTypeRef
impl Unpin for WebidlTypeRef
impl UnwindSafe for WebidlTypeRef
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