MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / name

Method name

atomic-core/src/change/encoding.rs:194–202  ·  view source on GitHub ↗

Get the canonical name of this encoding. Returns a string suitable for display or serialization.

(&self)

Source from the content-addressed store, hash-verified

192 ///
193 /// Returns a string suitable for display or serialization.
194 pub fn name(&self) -> &'static str {
195 match self {
196 Encoding::Utf8 => "UTF-8",
197 Encoding::Utf16Le => "UTF-16LE",
198 Encoding::Utf16Be => "UTF-16BE",
199 Encoding::Latin1 => "ISO-8859-1",
200 Encoding::Binary => "binary",
201 }
202 }
203
204 /// Parse an encoding from its name.
205 ///

Callers 1

addMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected