InNamespace

Struct InNamespace 

Source
pub struct InNamespace<'a, T>(pub T, pub &'a str);
Expand description

Something that lives in a namespace like a tag or attribute

Tuple Fields§

§0: T§1: &'a str

Implementations§

Source§

impl<'a, 'b> InNamespace<'a, Attribute>

Source

pub const fn any_attr_const(self) -> AnyAttribute<'a, 'b>

Source§

impl<'a, 'b> InNamespace<'a, &'b str>

Source

pub const fn any_attr_const(self) -> AnyAttribute<'a, 'b>

Source§

impl<'a, 'b> InNamespace<'a, Element>

Source

pub const fn any_element_const(self) -> AnyElement<'a, 'b>

Turn into an AnyElement in a const context

Source§

impl<'a, 'b> InNamespace<'a, &'b str>

Source

pub const fn any_element_const(self) -> AnyElement<'a, 'b>

Trait Implementations§

Source§

impl<'a, 'b> From<InNamespace<'a, &'b str>> for AnyAttribute<'a, 'b>

Source§

fn from(a: InNamespace<'a, &'b str>) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b> From<InNamespace<'a, &'b str>> for AnyElement<'a, 'b>

Source§

fn from(e: InNamespace<'a, &'b str>) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b> From<InNamespace<'a, Attribute>> for AnyAttribute<'a, 'b>

Source§

fn from(a: InNamespace<'a, Attribute>) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b> From<InNamespace<'a, Element>> for AnyElement<'a, 'b>

Source§

fn from(e: InNamespace<'a, Element>) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b> IntoAttribue<'a, 'b> for InNamespace<'a, &'b str>

Source§

fn encode(self, v: &mut Batch)

Encode the attribute into the message channel
Source§

fn encode_u8_discriminant(&self, v: &mut Batch)

Encode the attribute into the message channel with a u8 desciminant instead of bit packed bools
Source§

const SINGLE_BYTE: bool = false

If the attribute can be encoded in a single byte
Source§

unsafe fn encode_prealloc(self, v: &mut Batch)
where Self: Sized,

Encode the attribute into the message channel with memory pre-allocated Read more
Source§

impl<'a, 'b> IntoAttribue<'a, 'b> for InNamespace<'a, Attribute>

Source§

fn encode(self, v: &mut Batch)

Encode the attribute into the message channel
Source§

fn encode_u8_discriminant(&self, v: &mut Batch)

Encode the attribute into the message channel with a u8 desciminant instead of bit packed bools
Source§

const SINGLE_BYTE: bool = false

If the attribute can be encoded in a single byte
Source§

unsafe fn encode_prealloc(self, v: &mut Batch)
where Self: Sized,

Encode the attribute into the message channel with memory pre-allocated Read more
Source§

impl<'a, 'b> IntoElement<'a, 'b> for InNamespace<'a, &'b str>

Source§

fn encode(&self, v: &mut Batch)

Encode the element into the message channel
Source§

const SINGLE_BYTE: bool = false

If the element name can be encoded in a single byte
Source§

unsafe fn encode_prealloc(&self, v: &mut Batch)
where Self: Sized,

Encode the element into the message channel with memory pre-allocated Read more
Source§

impl<'a, 'b> IntoElement<'a, 'b> for InNamespace<'a, Element>

Source§

fn encode(&self, v: &mut Batch)

Encode the element into the message channel
Source§

const SINGLE_BYTE: bool = false

If the element name can be encoded in a single byte
Source§

unsafe fn encode_prealloc(&self, v: &mut Batch)
where Self: Sized,

Encode the element into the message channel with memory pre-allocated Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for InNamespace<'a, T>
where T: Freeze,

§

impl<'a, T> RefUnwindSafe for InNamespace<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for InNamespace<'a, T>
where T: Send,

§

impl<'a, T> Sync for InNamespace<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for InNamespace<'a, T>
where T: Unpin,

§

impl<'a, T> UnwindSafe for InNamespace<'a, T>
where T: UnwindSafe,

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