Skip to main content

PropertiesReader

Struct PropertiesReader 

Source
pub struct PropertiesReader;
Expand description

Java .properties 포맷 Reader

key=value, key: value, key value 형식의 Java properties 파일을 파싱하여 flat Object({ "key": "value" })로 변환한다.

  • # 또는 ! 주석 지원
  • 빈 줄 무시
  • \ 줄 연속 (multiline value)
  • Unicode 이스케이프: \uXXXX
  • 키의 . 구분자는 유지 (flat 모델)

Trait Implementations§

Source§

impl FormatReader for PropertiesReader

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.