ba2

Trait Reader

Source
pub trait Reader<T>: Sealed {
    type Error;
    type Item;

    // Required method
    fn read(source: T) -> Result<Self::Item, Self::Error>;
}
Expand description

A trait that enables reading from various sources.

Required Associated Types§

Required Methods§

Source

fn read(source: T) -> Result<Self::Item, Self::Error>

Reads an instance of Self::Item from the given source.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Reader<&File> for ba2::fo4::Archive<'static>

Source§

impl Reader<&File> for ba2::tes3::Archive<'static>

Source§

type Error = Error

Source§

type Item = Archive<'static>

Source§

impl Reader<&File> for File<'static>

Source§

type Error = Error

Source§

type Item = File<'static>

Source§

impl Reader<&File> for ba2::tes4::Archive<'static>

Source§

impl Reader<&Path> for ba2::fo4::Archive<'static>

Source§

impl Reader<&Path> for ba2::tes3::Archive<'static>

Source§

type Error = Error

Source§

type Item = Archive<'static>

Source§

impl Reader<&Path> for File<'static>

Source§

type Error = Error

Source§

type Item = File<'static>

Source§

impl Reader<&Path> for ba2::tes4::Archive<'static>

Source§

impl<'bytes> Reader<Borrowed<'bytes>> for ba2::fo4::Archive<'bytes>

Source§

impl<'bytes> Reader<Borrowed<'bytes>> for ba2::tes3::Archive<'bytes>

Source§

impl<'bytes> Reader<Borrowed<'bytes>> for File<'bytes>

Source§

type Error = Error

Source§

type Item = File<'bytes>

Source§

impl<'bytes> Reader<Borrowed<'bytes>> for ba2::tes4::Archive<'bytes>

Source§

impl<'bytes> Reader<Copied<'bytes>> for ba2::fo4::Archive<'static>

Source§

impl<'bytes> Reader<Copied<'bytes>> for ba2::tes3::Archive<'static>

Source§

type Error = Error

Source§

type Item = Archive<'static>

Source§

impl<'bytes> Reader<Copied<'bytes>> for File<'static>

Source§

type Error = Error

Source§

type Item = File<'static>

Source§

impl<'bytes> Reader<Copied<'bytes>> for ba2::tes4::Archive<'static>