Skip to main content

IniReader

Struct IniReader 

Source
pub struct IniReader;
Expand description

INI/CFG 포맷 Reader

[section] 헤더와 key = value 형식의 설정 파일을 파싱하여 2-depth Object({ section: { key: value } })로 변환한다.

  • # 또는 ; 주석 지원
  • 빈 줄 무시
  • 구분자: = 또는 :
  • 섹션 없는 키는 최상위 오브젝트에 배치
  • .cfg 확장자도 동일 포맷으로 처리

Trait Implementations§

Source§

impl FormatReader for IniReader

Source§

fn read(&self, input: &str) -> Result<Value>

Parse the given string content and return a Value.
Source§

fn read_from_reader(&self, reader: impl Read) -> Result<Value>

Parse data from an io::Read source and return a Value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.