Struct rvlib::control::Control

source ·
pub struct Control {
    pub reader: Option<ReaderFromCfg>,
    pub info: Info,
    pub paths_navigator: PathsNavigator,
    pub opened_folder: Option<PathPair>,
    pub cfg: Cfg,
    pub file_loaded: Option<usize>,
    pub file_selected_idx: Option<usize>,
    pub file_info_selected: Option<String>,
    pub loading_screen_animation_counter: u128,
    pub log_export_path: Option<PathBuf>,
    /* private fields */
}

Fields§

§reader: Option<ReaderFromCfg>§info: Info§paths_navigator: PathsNavigator§opened_folder: Option<PathPair>§cfg: Cfg§file_loaded: Option<usize>§file_selected_idx: Option<usize>§file_info_selected: Option<String>§loading_screen_animation_counter: u128§log_export_path: Option<PathBuf>

Implementations§

source§

impl Control

source

pub fn http_address(&self) -> String

source

pub fn flags(&self) -> &ControlFlags

source

pub fn reload(&mut self, sort_type: SortType) -> RvResult<()>

source

pub fn load(&mut self, file_path: PathBuf) -> RvResult<ToolsDataMap>

source

pub fn sort( &mut self, sort_type: SortType, filter_str: &str, tools_data_map: &ToolsDataMap, active_tool_name: Option<&str>, ) -> RvResult<()>

source

pub fn save( &mut self, prj_path: PathBuf, tools_data_map: &ToolsDataMap, set_cur_prj: bool, ) -> RvResult<JoinHandle<()>>

source

pub fn new() -> Self

source

pub fn reader(&self) -> Option<&ReaderFromCfg>

source

pub fn read_image( &mut self, file_label_selected_idx: usize, reload: bool, ) -> RvResult<Option<ImageInfoPair>>

source

pub fn export_logs(&self, dst: &Path)

source

pub fn open_relative_folder(&mut self, new_folder: String) -> RvResult<()>

source

pub fn load_opened_folder_content( &mut self, sort_type: SortType, ) -> RvResult<()>

source

pub fn check_if_connected(&mut self, sort_type: SortType) -> RvResult<bool>

source

pub fn opened_folder_label(&self) -> Option<&str>

source

pub fn file_label(&self, idx: usize) -> &str

source

pub fn cfg_of_opened_folder(&self) -> Option<&Cfg>

source

pub fn connection_data(&self) -> RvResult<ConnectionData>

source

pub fn meta_data( &self, file_selected_idx: Option<usize>, is_loading_screen_active: Option<bool>, ) -> MetaData

source

pub fn redo(&mut self, history: &mut History) -> Option<(World, Option<usize>)>

source

pub fn undo(&mut self, history: &mut History) -> Option<(World, Option<usize>)>

source

pub fn load_new_image_if_triggered( &mut self, world: &World, history: &mut History, ) -> RvResult<Option<(World, Option<usize>)>>

Trait Implementations§

source§

impl Default for Control

source§

fn default() -> Control

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> 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> NoneValue for T
where T: Default,

source§

type NoneType = T

source§

fn null_value() -> T

The none-equivalent value.
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<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

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