Skip to main content

Attribute

Struct Attribute 

Source
pub struct Attribute<'a> { /* private fields */ }
Expand description

One original attribute, preserving all values without interpreting unknown syntax.

Implementations§

Source§

impl<'a> Attribute<'a>

Source

pub fn kind(&self) -> Oid<'a>

The original attribute identifier.

Source

pub fn kind_encoding(&self) -> &'a [u8] ⓘ

The original attrType encoding, including its tag and length octets.

Source

pub fn values(&self) -> &[Element<'a>]

Every original value, including unknown or generically empty value sets.

Source

pub fn span(&self) -> Span

The original attribute source range.

Source

pub fn as_bytes(&self) -> &'a [u8] ⓘ

The original encoded attribute without normalization.

Source

pub fn value_reader( &self, index: usize, execution: &Memory, field: &'static str, ) -> Result<Option<Reader<'a>>>

Opens one original value in the current account and inherited parser depth.

The index selects this attribute’s catalogue, so a foreign element cannot be rebound to its provenance. No serialized bridge or replacement parser is used. Missing indices are absence; resource refusal remains an error.

Source

pub fn value_reader_in<'query>( &self, index: usize, parent: &Reader<'query>, field: &'static str, ) -> Result<Option<Reader<'query>>>
where 'a: 'query,

Opens one original value with producing local and current aggregate work. A foreign parser session refuses before lookup/allocation; it cannot silently replace the current producing ceiling with this value’s old one.

Source

pub fn single(&self, field: &'static str) -> Result<&Element<'a>>

Requires a singleton for attribute types whose specific schema demands it.

Trait Implementations§

Source§

impl<'a> Debug for Attribute<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for Attribute<'a>

§

impl<'a> !RefUnwindSafe for Attribute<'a>

§

impl<'a> !Send for Attribute<'a>

§

impl<'a> !Sync for Attribute<'a>

§

impl<'a> !UnwindSafe for Attribute<'a>

§

impl<'a> Unpin for Attribute<'a>

§

impl<'a> UnsafeUnpin for Attribute<'a>

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

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.