Skip to main content

Ser

Struct Ser 

Source
pub struct Ser { /* private fields */ }
Expand description

SER format description version 3

Authors Heiko Wilkens (version 2) Grischa Hahn (red = extensions of version 3)

2014 Feb 06

Source: https://grischa-hahn.hier-im-netz.de/astro/ser/SER%20Doc%20V3b.pdf

Implementations§

Source§

impl Ser

Source

pub fn lu_id(&self) -> &i32

2_LuID

Format: Integer_32 (little-endian)

Length: 4 Byte

Content: Lumenera camera series ID (currently unused; default = 0)

Source

pub fn observer(&self) -> &FixedString<40>

9_Observer

Format: String

Length: 40 Byte (40 ASCII characters {32…126 dec.}, fill unused characters with 0 dec.)

Content: Name of observer

Source

pub fn instrument(&self) -> &FixedString<40>

10_Instrument

Format: String

Length: 40 Byte (40 ASCII characters {32…126 dec.}, fill unused characters with 0 dec.)

Content: Name of used camera

Source

pub fn telescope(&self) -> &FixedString<40>

11_Telescope

Format: String

Length: 40 Byte (40 ASCII characters {32…126 dec.}, fill unused characters with 0 dec.)

Content: Name of used telescope

Source

pub fn datetime(&self) -> &Timestamp

12_DateTime

Format: Date / Integer_64 (little-endian)

Length: 8 Byte

Content: Start time of image stream (local time)

If 12_DateTime <= 0 then 12_DateTime is invalid and the SER file does not contain a Time stamp trailer.

Source

pub fn datetime_utc(&self) -> &Timestamp

13_DateTime_UTC

Format: Date / Integer_64 (little-endian)

Length: 8 Byte

Content: Start time of image stream in UTC

Source§

impl Ser

Source

pub fn set_lu_id(&mut self, val: i32) -> &mut Self

2_LuID

Format: Integer_32 (little-endian)

Length: 4 Byte

Content: Lumenera camera series ID (currently unused; default = 0)

Source

pub fn set_observer(&mut self, val: FixedString<40>) -> &mut Self

9_Observer

Format: String

Length: 40 Byte (40 ASCII characters {32…126 dec.}, fill unused characters with 0 dec.)

Content: Name of observer

Source

pub fn set_instrument(&mut self, val: FixedString<40>) -> &mut Self

10_Instrument

Format: String

Length: 40 Byte (40 ASCII characters {32…126 dec.}, fill unused characters with 0 dec.)

Content: Name of used camera

Source

pub fn set_telescope(&mut self, val: FixedString<40>) -> &mut Self

11_Telescope

Format: String

Length: 40 Byte (40 ASCII characters {32…126 dec.}, fill unused characters with 0 dec.)

Content: Name of used telescope

Source§

impl Ser

Source

pub fn with_format(format: FrameFormat) -> Self

Source

pub fn frame_format(&self) -> FrameFormat

Creates a new copy of this SER’s frame format

Source

pub fn has_frame_timestamps(&self) -> bool

SER files include timestamps for each frame only if the datetime field is valid.

Source

pub fn frame_count(&self) -> usize

The number of frames

Source

pub fn iter(&self) -> impl Iterator<Item = (&Frame, Option<&Timestamp>)>

Returns an iterator for Frame references and their associated Timestamp if provided.

Source

pub fn into_iter(self) -> impl Iterator<Item = (Frame, Option<Timestamp>)>

Moves into an iterator for Frames and their associated Timestamp if provided.

Source

pub fn frames_mut<'a>(&'a mut self) -> FramesMut<'a>

Returns a FramesMut object for mutating frames

Source

pub fn dates_mut<'a>(&'a mut self) -> DatesMut<'a>

Returns a DatesMut object for mutating dates and frame timestamps

Trait Implementations§

Source§

impl BinRead for Ser

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of read_args() and read_options(). Read more
Source§

fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian,

Read Self from the reader using the given arguments. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl BinWrite for Ser

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of write_args() and write_options(). Read more
Source§

fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>

Write Self to the writer using the given Endian and arguments. Read more
Source§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self: WriteEndian, Self::Args<'a>: for<'a> Required,

Write Self to the writer using default arguments. Read more
Source§

fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming big-endian byte order. Read more
Source§

fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming little-endian byte order. Read more
Source§

fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming native-endian byte order. Read more
Source§

fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek, Self: WriteEndian,

Write Self to the writer using the given arguments. Read more
Source§

fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming big-endian byte order, using the given arguments. Read more
Source§

fn write_le_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming little-endian byte order, using the given arguments. Read more
Source§

fn write_ne_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming native-endian byte order, using the given arguments. Read more
Source§

impl From<FrameFormat> for Ser

Source§

fn from(value: FrameFormat) -> Self

Converts to this type from the input type.
Source§

impl ReadEndian for Ser

Source§

const ENDIAN: EndianKind

The endianness of the type.
Source§

impl WriteEndian for Ser

Source§

const ENDIAN: EndianKind

The endianness of the type.

Auto Trait Implementations§

§

impl Freeze for Ser

§

impl RefUnwindSafe for Ser

§

impl Send for Ser

§

impl Sync for Ser

§

impl Unpin for Ser

§

impl UnsafeUnpin for Ser

§

impl UnwindSafe for Ser

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.