MCPcopy Index your code
hub / github.com/RustPython/RustPython / from_string

Method from_string

crates/stdlib/src/ssl/oid.rs:51–63  ·  view source on GitHub ↗

Create entry from OID string (for OIDs not in oid-registry)

(
        nid: i32,
        short_name: &'static str,
        long_name: &'static str,
        oid_str: &'static str,
    )

Source from the content-addressed store, hash-verified

49
50 /// Create entry from OID string (for OIDs not in oid-registry)
51 pub const fn from_string(
52 nid: i32,
53 short_name: &'static str,
54 long_name: &'static str,
55 oid_str: &'static str,
56 ) -> Self {
57 Self {
58 nid,
59 short_name,
60 long_name,
61 oid: OidRef::String(oid_str),
62 }
63 }
64
65 /// Get OID as string (e.g., "2.5.4.3")
66 pub fn oid_string(&self) -> String {

Callers

nothing calls this directly

Calls 1

StringClass · 0.50

Tested by

no test coverage detected