Struct modio::mods::ModRef

source ·
pub struct ModRef { /* private fields */ }
Expand description

Reference interface of a mod.

Implementations§

source§

impl ModRef

source

pub async fn get(self) -> Result<Mod>

Get a reference to the Modio mod object that this ModRef refers to.

source

pub fn files(&self) -> Files

Return a reference to an interface that provides access to the files of a mod.

source

pub fn file(&self, id: FileId) -> FileRef

Return a reference to a file of a mod.

source

pub fn metadata(&self) -> Metadata

Return a reference to an interface to manage metadata key value pairs of a mod.

source

pub fn tags(&self) -> Tags

Return a reference to an interface to manage the tags of a mod.

source

pub fn comments(&self) -> Comments

Return a reference to an interface that provides access to the comments of a mod.

source

pub fn dependencies(&self) -> Dependencies

Return a reference to an interface to manage the dependencies of a mod.

source

pub async fn statistics(self) -> Result<Statistics>

Return the statistics for a mod.

source

pub fn events(self, filter: Filter) -> Query<Event>

Returns a Query interface to retrieve the event log for a mod sorted by latest event first.

See Filters and sorting.

source

pub fn members(&self) -> Members

Return a reference to an interface to manage team members of a mod.

source

pub async fn edit(self, options: EditModOptions) -> Result<Editing<Mod>>

Edit details for a mod. [required: token]

source

pub async fn delete(self) -> Result<()>

Delete a mod. [required: token]

source

pub async fn add_media(self, options: AddMediaOptions) -> Result<()>

Add new media to a mod. [required: token]

source

pub async fn delete_media(self, options: DeleteMediaOptions) -> Result<Deletion>

Delete media from a mod. [required: token]

source

pub async fn reorder_media(self, options: ReorderMediaOptions) -> Result<()>

Reorder images, sketchfab or youtube links from a mod profile. [required: token]

source

pub async fn rate(self, rating: Rating) -> Result<()>

Submit a positive or negative rating for a mod. [required: token]

source

pub async fn subscribe(self) -> Result<()>

Subscribe the authenticated user to a mod. [required: token]

source

pub async fn unsubscribe(self) -> Result<()>

Unsubscribe the authenticated user from a mod. [required: token]

Trait Implementations§

source§

impl Clone for ModRef

source§

fn clone(&self) -> ModRef

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for ModRef

§

impl !RefUnwindSafe for ModRef

§

impl Send for ModRef

§

impl Sync for ModRef

§

impl Unpin for ModRef

§

impl !UnwindSafe for ModRef

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.

§

impl<T> Instrument for T

§

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

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

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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