Struct steamworks::UGC

source ·
pub struct UGC<Manager> { /* private fields */ }

Implementations§

source§

impl<Manager> UGC<Manager>

source

pub fn suspend_downloads(&self, suspend: bool)

Suspends or resumes all workshop downloads

source

pub fn create_item<F>(&self, app_id: AppId, file_type: FileType, cb: F)
where F: FnOnce(Result<(PublishedFileId, bool), SteamError>) + 'static + Send,

Creates a workshop item

source

pub fn start_item_update( &self, app_id: AppId, file_id: PublishedFileId ) -> UpdateHandle<Manager>

Starts an item update process

source

pub fn subscribe_item<F>(&self, published_file_id: PublishedFileId, cb: F)
where F: FnOnce(Result<(), SteamError>) + 'static + Send,

Subscribes to a workshop item

source

pub fn unsubscribe_item<F>(&self, published_file_id: PublishedFileId, cb: F)
where F: FnOnce(Result<(), SteamError>) + 'static + Send,

source

pub fn subscribed_items(&self) -> Vec<PublishedFileId>

Gets the publisher file IDs of all currently subscribed items.

source

pub fn item_state(&self, item: PublishedFileId) -> ItemState

source

pub fn item_download_info(&self, item: PublishedFileId) -> Option<(u64, u64)>

source

pub fn item_install_info(&self, item: PublishedFileId) -> Option<InstallInfo>

source

pub fn download_item(&self, item: PublishedFileId, high_priority: bool) -> bool

source

pub fn query_all( &self, query_type: UGCQueryType, item_type: UGCType, appids: AppIDs, page: u32 ) -> Result<QueryHandle<Manager>, CreateQueryError>

Queries a paged list of all workshop items.

source

pub fn query_user( &self, account: AccountId, list_type: UserList, item_type: UGCType, sort_order: UserListOrder, appids: AppIDs, page: u32 ) -> Result<QueryHandle<Manager>, CreateQueryError>

Queries a list of workshop itmes, related to a user in some way (Ex. user’s subscriptions, favorites, upvoted, …)

source

pub fn query_items( &self, items: Vec<PublishedFileId> ) -> Result<QueryHandle<Manager>, CreateQueryError>

source

pub fn query_item( &self, item: PublishedFileId ) -> Result<QueryHandle<Manager>, CreateQueryError>

source

pub fn delete_item<F>(&self, published_file_id: PublishedFileId, cb: F)
where F: FnOnce(Result<(), SteamError>) + 'static + Send,

DELETES the item from the Steam Workshop.

source§

impl UGC<ServerManager>

source

pub fn init_for_game_server( &self, workshop_depot: DepotId_t, folder: &str ) -> bool

Initialize this UGC interface for a Steam game server.

You should pass in the Workshop depot, you can find this on SteamDB. It’s usually just the app ID.

The folder is a path to the directory where you wish for this game server to store UGC content.

true upon success; otherwise, false if the calling user is not a game server or if the workshop is currently updating its content.

Auto Trait Implementations§

§

impl<Manager> RefUnwindSafe for UGC<Manager>
where Manager: RefUnwindSafe,

§

impl<Manager> !Send for UGC<Manager>

§

impl<Manager> !Sync for UGC<Manager>

§

impl<Manager> Unpin for UGC<Manager>

§

impl<Manager> UnwindSafe for UGC<Manager>
where Manager: RefUnwindSafe,

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