Struct Cell

Source
pub struct Cell<T: CellType> { /* private fields */ }
Expand description

A Rust wrapper around a SpiceCell and its data.

Implementations§

Source§

impl<T: CellType> Cell<T>

Source

pub fn as_mut_cell(&mut self) -> *mut SpiceCell

Access the internal CSPICE Cell structure.

Source

pub fn set_cardinality(&mut self, cardinality: usize) -> Result<(), Error>

Set the cardinality of a cell.

See scard_c.

Source

pub fn get_size(&mut self) -> Result<usize, Error>

Return the size (maximum cardinality) of a SPICE cell.

See size_c

Source

pub fn get_cardinality(&mut self) -> Result<usize, Error>

Return the cardinality (current number of elements) in a cell.

See card_c.

Source

pub fn copy(&mut self, dest: &mut Cell<T>) -> Result<(), Error>

Copy the contents of a SpiceCell of any data type to another cell of the same type.

See copy_c.

Source§

impl Cell<SpiceDouble>

Source

pub fn new_double(size: usize) -> Self

Creates a SPICEDOUBLE_CELL

See Declaring and Initializing Cells

Source

pub fn append(&mut self, item: SpiceDouble) -> Result<(), Error>

Append an item to a double precision cell

See appndd_c

Source§

impl Cell<SpiceInt>

Source

pub fn new_int(size: usize) -> Self

Creates a SPICEINT_CELL

See Declaring and Initializing Cells

Source

pub fn append(&mut self, item: SpiceInt) -> Result<(), Error>

Append an item to an integer cell

See appndi_c

Source§

impl Cell<SpiceChar>

Source

pub fn new_char(size: usize, length: usize) -> Self

Creates a SPICECHAR_CELL

See Character Cells

Source

pub fn append<'s, S: Into<StringParam<'s>>>( &mut self, item: S, ) -> Result<(), Error>

Append an item to a character cell

See appndc_c

Source§

impl Cell<SpiceDouble>

Window specific functions

Source

pub fn window_cardinality(&mut self) -> Result<SpiceInt, Error>

Return the cardinality (number of intervals) of a double precision window.

See wncard_c.

Source

pub fn window_compliment( &mut self, left: SpiceDouble, right: SpiceDouble, output: &mut Window, ) -> Result<(), Error>

Determine the complement of a double precision window with respect to a specified interval.

See wncomd_c.

Source

pub fn window_contract( &mut self, left: SpiceDouble, right: SpiceDouble, ) -> Result<(), Error>

Contract each of the intervals of a double precision window.

See wncond_c.

Source

pub fn window_difference( &mut self, other: &mut Window, output: &mut Window, ) -> Result<(), Error>

Place the difference of two double precision windows into a third window.

See wndifd_c.

Source

pub fn window_contains_element( &mut self, point: SpiceDouble, ) -> Result<bool, Error>

Determine whether a point is an element of a double precision window

See wnelmd_c.

Source

pub fn window_expand( &mut self, left: SpiceDouble, right: SpiceDouble, ) -> Result<(), Error>

Expand each of the intervals of a double precision window

See wnexpd_c.

Source

pub fn window_extract(&mut self, side: Side) -> Result<(), Error>

Extract the left or right endpoints from a double precision window.

See wnextd_c.

Source

pub fn window_interval( &mut self, n: usize, ) -> Result<(SpiceDouble, SpiceDouble), Error>

Fetch a particular interval from a double precision window.

See wnfetd_c.

Source

pub fn window_fill(&mut self, small_gap: SpiceDouble) -> Result<(), Error>

Fill small gaps between adjacent intervals of a double precision window.

See wnfild_c.

Source

pub fn window_filter( &mut self, small_interval: SpiceDouble, ) -> Result<(), Error>

Filter (remove) small intervals from a double precision window.

See wnfltd_c.

Source

pub fn window_contains_interval( &mut self, left: SpiceDouble, right: SpiceDouble, ) -> Result<bool, Error>

Determine whether an interval is included in a double precision window.

See wnincd_c.

Source

pub fn window_insert_interval( &mut self, left: SpiceDouble, right: SpiceDouble, ) -> Result<(), Error>

Insert an interval into a double precision window.

See wninsd_c.

Source

pub fn window_intersect( &mut self, other: &mut Window, output: &mut Window, ) -> Result<(), Error>

Place the intersection of two double precision windows into a third window.

See wnintd_c.

Source

pub fn window_compare( &mut self, comparison_op: ComparisonOperator, other: &mut Window, ) -> Result<bool, Error>

Compare two double precision windows.

See wnreld_c.

Source

pub fn window_summarize(&mut self) -> Result<WindowSummary, Error>

Summarize the contents of a double precision window.

See wnsumd_c.

Source

pub fn window_union( &mut self, other: &mut Window, output: &mut Window, ) -> Result<(), Error>

Place the union of two double precision windows into a third window.

See wnunid_c.

Source

pub fn window_validate(&mut self, size: usize, n: usize) -> Result<(), Error>

Form a valid double precision window from the contents of a window array.

See wnvald_c.

Auto Trait Implementations§

§

impl<T> Freeze for Cell<T>

§

impl<T> RefUnwindSafe for Cell<T>
where T: RefUnwindSafe,

§

impl<T> !Send for Cell<T>

§

impl<T> !Sync for Cell<T>

§

impl<T> Unpin for Cell<T>
where T: Unpin,

§

impl<T> UnwindSafe for Cell<T>
where T: UnwindSafe,

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.