MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / from_str

Method from_str

crates/asm-to-binary/src/assembler/section.rs:12–20  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

10
11impl SectionKind {
12 pub fn from_str(s: &str) -> Self {
13 match s.trim() {
14 ".text" => Self::Text,
15 ".data" => Self::Data,
16 ".rodata" => Self::RoData,
17 ".bss" => Self::Bss,
18 other => Self::Custom(other.to_owned()),
19 }
20 }
21
22 pub fn name(&self) -> &str {
23 match self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected