Struct Csv

Source
pub struct Csv<P, Config, E>
where P: AsRef<Path> + Debug, E: Debug, SamplingConfigError: From<E>, Config: TryInto<SamplingConfig, Error = E> + Debug + Copy,
{ pub path: P, pub sampling_config: Config, pub option: CsvOption, }
Expand description

Modulation from CSV data.

Fields§

§path: P

The path to the CSV file.

§sampling_config: Config

The sampling configuration of the CSV file.

§option: CsvOption

The option of Csv.

Implementations§

Source§

impl<P, Config, E> Csv<P, Config, E>
where P: AsRef<Path> + Debug, E: Debug, SamplingConfigError: From<E>, Config: TryInto<SamplingConfig, Error = E> + Debug + Copy,

Source

pub fn new(path: P, sampling_config: Config, option: CsvOption) -> Self

Constructs a new Csv.

Trait Implementations§

Source§

impl<P, Config, E> DatagramL for Csv<P, Config, E>
where P: AsRef<Path> + Debug, E: Debug, SamplingConfigError: From<E>, Config: TryInto<SamplingConfig, Error = E> + Debug + Copy,

Source§

fn option(&self) -> DatagramOption

Returns the option of the datagram.
Source§

impl<P, Config, E> Debug for Csv<P, Config, E>
where P: AsRef<Path> + Debug + Debug, E: Debug + Debug, SamplingConfigError: From<E>, Config: TryInto<SamplingConfig, Error = E> + Debug + Copy + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<P, Config, E> Modulation for Csv<P, Config, E>
where P: AsRef<Path> + Debug, E: Debug, SamplingConfigError: From<E>, Config: TryInto<SamplingConfig, Error = E> + Debug + Copy,

Source§

fn calc(self) -> Result<Vec<u8>, ModulationError>

Calculate the modulation data.
Source§

fn sampling_config(&self) -> Result<SamplingConfig, ModulationError>

The sampling configuration.

Auto Trait Implementations§

§

impl<P, Config, E> Freeze for Csv<P, Config, E>
where SamplingConfigError: Sized, P: Freeze, Config: Freeze,

§

impl<P, Config, E> RefUnwindSafe for Csv<P, Config, E>

§

impl<P, Config, E> Send for Csv<P, Config, E>
where SamplingConfigError: Sized, P: Send, Config: Send,

§

impl<P, Config, E> Sync for Csv<P, Config, E>
where SamplingConfigError: Sized, P: Sync, Config: Sync,

§

impl<P, Config, E> Unpin for Csv<P, Config, E>
where SamplingConfigError: Sized, P: Unpin, Config: Unpin,

§

impl<P, Config, E> UnwindSafe for Csv<P, Config, E>

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<D> Datagram for D
where D: DatagramS,

Source§

type G = <D as DatagramS>::G

Source§

type Error = <D as DatagramS>::Error

Source§

fn operation_generator( self, geometry: &Geometry, parallel: bool, ) -> Result<<D as Datagram>::G, <D as Datagram>::Error>

Source§

fn option(&self) -> DatagramOption

Returns the option of the datagram.
Source§

impl<D> DatagramS for D
where D: DatagramL,

Source§

type G = <D as DatagramL>::G

Source§

type Error = <D as DatagramL>::Error

Source§

fn operation_generator_with_segment( self, geometry: &Geometry, parallel: bool, segment: Segment, transition_mode: Option<TransitionMode>, ) -> Result<<D as DatagramS>::G, <D as DatagramS>::Error>

Source§

fn option(&self) -> DatagramOption

Returns the option of the datagram.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more