pub struct Flights { /* private fields */ }Implementations
sourceimpl Flights
impl Flights
sourcepub fn add_from_at_strs<S>(&mut self, flights: Vec<S>) -> Result<Vec<String>>where
S: AsRef<str>,
pub fn add_from_at_strs<S>(&mut self, flights: Vec<S>) -> Result<Vec<String>>where
S: AsRef<str>,
Takes strings in the form of @- or @path and creates then adds them to the DB. Only one @- may be used or an Error is returned.
Returns a list of any created IDs
sourcepub fn remove_indices(&mut self, indices: &[usize]) -> Vec<Flight>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn remove_indices(&mut self, indices: &[usize]) -> Vec<Flight>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Removes any Flight definitions from the matching indices and returns a Vec of all removed Flights
sourcepub fn indices_of_left_matches(&self, needle: &str) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn indices_of_left_matches(&self, needle: &str) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns all indices of where the flight’s Name or ID (as hex) begins with the needle
sourcepub fn indices_of_matches(&self, needle: &str) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn indices_of_matches(&self, needle: &str) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns all indices of where the flight’s Name or ID (as hex) is an exact match of needle
pub fn iter(&self) -> impl Iterator<Item = &Flight>
pub fn clone_flight(&mut self, src: &str, exact: bool) -> Result<Flight>
sourcepub fn update_or_create_flight(
&mut self,
model: &FlightModel
) -> Vec<(String, Id)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn update_or_create_flight(
&mut self,
model: &FlightModel
) -> Vec<(String, Id)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Either updates a matching local flight, or creates a new one. Returns NEW flight names and IDs
pub fn update_flight(
&mut self,
src: &str,
exact: bool,
ctx: &FlightCtx
) -> Result<()>
pub fn add_flight(&mut self, flight: Flight)
pub fn remove_flight(&mut self, src: &str, exact: bool) -> Result<Flight>
pub fn find_name(&self, name: &str) -> Option<&Flight>
pub fn find_name_or_partial_id(&self, needle: &str) -> Option<&Flight>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Flights
impl<'de> Deserialize<'de> for Flights
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromDisk for Flights
impl FromDisk for Flights
sourcefn set_loaded_from<P: AsRef<Path>>(&mut self, p: P)
fn set_loaded_from<P: AsRef<Path>>(&mut self, p: P)
Allows one to save or deserialize what path the item was loaded from
sourcefn loaded_from(&self) -> Option<&Path>
fn loaded_from(&self) -> Option<&Path>
If saved, get the path the item was loaded from
sourceimpl Output for Flights
impl Output for Flights
fn print_json(&self, _ctx: &Ctx) -> Result<()>
fn print_table(&self, _ctx: &Ctx) -> Result<()>
Auto Trait Implementations
impl RefUnwindSafe for Flights
impl Send for Flights
impl Sync for Flights
impl Unpin for Flights
impl UnwindSafe for Flights
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more