pub struct OwnedOid { /* private fields */ }Expand description
An independently owned object identifier with retained capacity accounting.
Its immutable storage is validated at construction. Borrowing its OID view does not rescan the encoded arcs; callers admit subsequent comparisons or traversal in the execution domain of the current operation.
Implementations§
Source§impl OwnedOid
impl OwnedOid
Sourcepub fn parse(text: &str, execution: &Memory) -> Result<Self>
pub fn parse(text: &str, execution: &Memory) -> Result<Self>
Parses strict dotted-decimal numericOID text into owned encoded arcs.
Uses RFC4512 §1.4’s decimal-component grammar (at least two components, no padded decimal component) and ASN.1’s first/second arc restrictions. Arc width is unrestricted by machine integers. Work, scratch, copying and capacity are admitted before execution; the result keeps its charge.
§Errors
Returns MalformedOid at the offending text offset, or a distinct
resource error before unfunded conversion/allocation.
Sourcepub fn from_oid(value: Oid<'_>, execution: &Memory) -> Result<Self, MemoryError>
pub fn from_oid(value: Oid<'_>, execution: &Memory) -> Result<Self, MemoryError>
Copies an already validated identifier into the supplied storage domain. The original encoding and source remain unchanged on resource refusal.
Sourcepub fn from_oid_in<W: Work>(
value: Oid<'_>,
execution: &W,
) -> Result<Self, MemoryError>
pub fn from_oid_in<W: Work>( value: Oid<'_>, execution: &W, ) -> Result<Self, MemoryError>
Retains validated arcs after funding copying/capacity in current work. The resulting owner keeps its allocation but no borrowed parser budget.