Skip to main content

RomsAction

Enum RomsAction 

Source
pub enum RomsAction {
    Get {
        id: u64,
    },
    Find {
        crc: Option<String>,
        md5: Option<String>,
        sha1: Option<String>,
        igdb_id: Option<i64>,
        moby_id: Option<i64>,
        ss_id: Option<i64>,
        ra_id: Option<i64>,
        launchbox_id: Option<i64>,
        hasheous_id: Option<i64>,
        tgdb_id: Option<i64>,
        flashpoint_id: Option<String>,
        hltb_id: Option<i64>,
    },
    Filters,
    Delete {
        rom_ids: Vec<u64>,
        delete_from_fs: Vec<u64>,
        yes: bool,
    },
    Props {
        id: u64,
        is_main_sibling: Option<String>,
        backlogged: Option<String>,
        now_playing: Option<String>,
        hidden: Option<String>,
        rating: Option<u8>,
        difficulty: Option<u8>,
        completion: Option<u8>,
        status: Option<String>,
        update_last_played: bool,
        remove_last_played: bool,
    },
    NotesList {
        rom_id: u64,
        public_only: Option<String>,
        search: Option<String>,
        tags: Vec<String>,
    },
    NotesAdd {
        rom_id: u64,
        json: String,
    },
    NotesUpdate {
        rom_id: u64,
        note_id: u64,
        json: String,
    },
    NotesDelete {
        rom_id: u64,
        note_id: u64,
    },
    ManualsAdd {
        rom_id: u64,
        file: PathBuf,
    },
    CoverSearch {
        rom_id: u64,
        query: String,
        search_by: String,
    },
    Upload {
        platform: String,
        file: PathBuf,
        scan: bool,
        wait: bool,
        wait_timeout_secs: Option<u64>,
    },
}

Variants§

§

Get

Get detailed information for a single ROM

Fields

§id: u64

The ID of the ROM

§

Find

Lookup ROM by file hash or metadata provider id

Fields

§igdb_id: Option<i64>
§moby_id: Option<i64>
§ss_id: Option<i64>
§ra_id: Option<i64>
§launchbox_id: Option<i64>
§hasheous_id: Option<i64>
§tgdb_id: Option<i64>
§flashpoint_id: Option<String>
§hltb_id: Option<i64>
§

Filters

Print canonical filter values from GET /api/roms/filters

§

Delete

Delete ROMs from the database (optional filesystem delete)

Fields

§rom_ids: Vec<u64>

ROM ids to remove from the database

§delete_from_fs: Vec<u64>

Also delete these ROM ids from disk (repeat ids as needed)

§yes: bool

Skip confirmation

§

Props

Update per-user ROM properties (PUT /api/roms/{id}/props)

Fields

§id: u64
§is_main_sibling: Option<String>
§backlogged: Option<String>
§now_playing: Option<String>
§hidden: Option<String>
§rating: Option<u8>
§difficulty: Option<u8>
§completion: Option<u8>
§status: Option<String>
§update_last_played: bool
§remove_last_played: bool
§

NotesList

List notes for a ROM

Fields

§rom_id: u64
§public_only: Option<String>
§search: Option<String>
§tags: Vec<String>
§

NotesAdd

Add a note (JSON body string, e.g. {"title":"t","content":"c"})

Fields

§rom_id: u64
§json: String

JSON object

§

NotesUpdate

Update a note

Fields

§rom_id: u64
§note_id: u64
§json: String
§

NotesDelete

Delete a note

Fields

§rom_id: u64
§note_id: u64
§

ManualsAdd

Upload a manual file (POST /api/roms/{id}/manuals)

Fields

§rom_id: u64
§file: PathBuf
§

CoverSearch

Search covers and metadata matches

Fields

§rom_id: u64
§query: String
§search_by: String
§

Upload

Upload a ROM file to a platform

Fields

§platform: String

Platform slug or name (e.g. “3ds”, “Nintendo 3DS”)

§file: PathBuf

File or directory to upload

§scan: bool

Trigger a library scan after upload completes

§wait: bool

Wait until the library scan finishes (requires --scan; polls every 2 seconds)

§wait_timeout_secs: Option<u64>

Max seconds to wait when --wait is set (default: 3600)

Trait Implementations§

Source§

impl Debug for RomsAction

Source§

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

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

impl FromArgMatches for RomsAction

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for RomsAction

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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