pub struct ObjectData { /* private fields */ }Expand description
An OBJECT-TYPE definition from an SMIv1 or SMIv2 module.
Contains both the raw definition fields and effective (inherited) values
computed during resolution. Access through ObjectData methods or the
Object handle type.
Implementations§
Source§impl ObjectData
Public accessor methods for ObjectData.
impl ObjectData
Public accessor methods for ObjectData.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Return the DESCRIPTION clause text.
Sourcepub fn default_value(&self) -> Option<&DefVal>
pub fn default_value(&self) -> Option<&DefVal>
Return the DEFVAL clause, if present.
Sourcepub fn augments(&self) -> Option<ObjectId>
pub fn augments(&self) -> Option<ObjectId>
Return the AUGMENTS target row id, if this row augments another.
Sourcepub fn augmented_by(&self) -> &[ObjectId]
pub fn augmented_by(&self) -> &[ObjectId]
Return rows that augment this row.
Sourcepub fn kind(&self, tree: &OidTree) -> Kind
pub fn kind(&self, tree: &OidTree) -> Kind
Return the node Kind by looking up the OidTree.
Returns Kind::Unknown if the object’s OID was not resolved.
Callers using the Object handle do not need
this method; use Object::kind instead.
Sourcepub fn effective_display_hint(&self) -> &str
pub fn effective_display_hint(&self) -> &str
Return the effective display hint, inherited from the resolved type chain.
This is pre-computed during resolution, so it does not require walking the type chain at query time.
Sourcepub fn effective_sizes(&self) -> &[Range]
pub fn effective_sizes(&self) -> &[Range]
Return the effective SIZE constraints, inherited from the resolved type chain.
Sourcepub fn effective_ranges(&self) -> &[Range]
pub fn effective_ranges(&self) -> &[Range]
Return the effective range constraints, inherited from the resolved type chain.
Sourcepub fn effective_enums(&self) -> &[NamedValue]
pub fn effective_enums(&self) -> &[NamedValue]
Return the effective enumeration values, inherited from the resolved type chain.
Sourcepub fn effective_bits(&self) -> &[NamedValue]
pub fn effective_bits(&self) -> &[NamedValue]
Return the effective BITS definitions, inherited from the resolved type chain.
Sourcepub fn sequence_type_name(&self) -> &str
pub fn sequence_type_name(&self) -> &str
Return the SEQUENCE type name from the table definition.
Sourcepub fn index(&self) -> &[IndexEntry]
pub fn index(&self) -> &[IndexEntry]
Return the INDEX clause entries.
Sourcepub fn syntax_span(&self) -> Span
pub fn syntax_span(&self) -> Span
Return the source span of the SYNTAX clause.
Sourcepub fn access_span(&self) -> Span
pub fn access_span(&self) -> Span
Return the source span of the ACCESS/MAX-ACCESS clause.
Sourcepub fn units_span(&self) -> Span
pub fn units_span(&self) -> Span
Return the source span of the UNITS clause.
Sourcepub fn augments_span(&self) -> Span
pub fn augments_span(&self) -> Span
Return the source span of the AUGMENTS clause.
Sourcepub fn default_value_span(&self) -> Span
pub fn default_value_span(&self) -> Span
Return the source span of the DEFVAL clause.
Sourcepub fn enum_by_label(&self, label: &str) -> Option<&NamedValue>
pub fn enum_by_label(&self, label: &str) -> Option<&NamedValue>
Look up an enumeration value by label name.
Sourcepub fn bit_by_label(&self, label: &str) -> Option<&NamedValue>
pub fn bit_by_label(&self, label: &str) -> Option<&NamedValue>
Look up a BITS value by label name.
Trait Implementations§
Source§impl Clone for ObjectData
impl Clone for ObjectData
Source§fn clone(&self) -> ObjectData
fn clone(&self) -> ObjectData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ObjectData
impl RefUnwindSafe for ObjectData
impl Send for ObjectData
impl Sync for ObjectData
impl Unpin for ObjectData
impl UnsafeUnpin for ObjectData
impl UnwindSafe for ObjectData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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