Struct rubbl_fits::FitsDecoder [−][src]
A decoder for single-pass streaming of a FITS file.
This struct decodes its input stream assuming it is in FITS format. The decoding is extremely low-level; only enough work is done to separate the stream into headers and data correctly. The underlying stream need only implement Read, and the items that are streamed out are well-suited for reproducing the input file byte-for-byte.
This class is not very picking about checking FITS conformity.
Implementations
impl<R: Read> FitsDecoder<R>
[src]
Note that we can’t implement our I/O paradigm using Iterator because Rust’s iterators aren’t “streaming”: basically, the Rust paradigm is that you can look at multiple iterator items at once, which isn’t compatible with our desire to be zero-copy and return byte slices rather than allocate vecs. See this discussion.
pub fn new(inner: R) -> Self
[src]
Create a new decoder that gets data from the Read type passed as an argument.
pub fn next<'a>(&'a mut self) -> Result<Option<LowLevelFitsItem<'a>>, Error>
[src]
Get the next item in the FITS stream.
Returns Ok(None) at an expected EOF.
pub fn into_inner(self) -> R
[src]
Consume this decoder and return the inner Read object.
Trait Implementations
impl<R: Clone + Read> Clone for FitsDecoder<R>
[src]
fn clone(&self) -> FitsDecoder<R>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for FitsDecoder<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for FitsDecoder<R> where
R: Send,
R: Send,
impl<R> Sync for FitsDecoder<R> where
R: Sync,
R: Sync,
impl<R> Unpin for FitsDecoder<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for FitsDecoder<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,