#[non_exhaustive]pub enum Endpoint {
Meta,
Motors,
InStock,
Vendors,
Motor(MotorName),
}Expand description
One of the API’s files.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Meta
meta.json: when the data was built, its counts and the endpoint index.
Motors
motors.json: every motor a vendor lists.
InStock
in-stock.json: the motors in stock at one vendor or more.
Vendors
vendors.json: the vendors read.
Motor(MotorName)
One motor’s page. Build it with Endpoint::motor, which checks the motor’s name.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn motor(
manufacturer: &str,
designation: &str,
) -> Result<Self, MotorFinderError>
pub fn motor( manufacturer: &str, designation: &str, ) -> Result<Self, MotorFinderError>
One motor’s page, by its manufacturer (the API’s name or slug, any case) and designation.
§Errors
MotorFinderError::Request for a manufacturer not in MANUFACTURERS, or a designation
that is empty, all dots, or holds a character other than an ASCII letter, a digit, -,
_, . or / (the characters ThrustCurve’s designations use).
Trait Implementations§
impl Eq for Endpoint
impl StructuralPartialEq for Endpoint
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.