pub struct CreateOrder {
pub item_id: String,
pub order_type: OrderType,
pub platinum: u32,
pub quantity: u32,
pub visible: bool,
pub per_trade: Option<u32>,
pub rank: Option<u8>,
pub charges: Option<u8>,
pub subtype: Option<String>,
pub amber_stars: Option<u8>,
pub cyan_stars: Option<u8>,
}Expand description
Request to create a new order.
Use the builder methods to construct orders with proper validation.
§Example
use wf_market::{CreateOrder, OrderType};
// Simple sell order
let order = CreateOrder::sell("nikana_prime_set", 100, 1);
// Mod order with rank
let mod_order = CreateOrder::sell("serration", 50, 1)
.with_mod_rank(10);
// Hidden order
let hidden = CreateOrder::buy("mesa_prime_set", 200, 1)
.hidden();
// Sculpture with stars
let sculpture = CreateOrder::sell("ayatan_anasa_sculpture", 25, 1)
.with_sculpture_stars(2, 4);Fields§
§item_id: StringID of the item to trade
order_type: OrderTypeOrder type (buy or sell)
platinum: u32Price in platinum
quantity: u32Quantity to trade
visible: boolWhether the order is visible
per_trade: Option<u32>Minimum items per trade
rank: Option<u8>Mod rank (for rankable mods)
charges: Option<u8>Charges remaining (for consumable mods)
subtype: Option<String>Item subtype (e.g., blueprint, crafted)
amber_stars: Option<u8>Amber stars installed (for sculptures)
cyan_stars: Option<u8>Cyan stars installed (for sculptures)
Implementations§
Source§impl CreateOrder
impl CreateOrder
Sourcepub fn with_mod_rank(self, rank: u8) -> Self
pub fn with_mod_rank(self, rank: u8) -> Self
Set the mod rank (for rankable mods).
Sourcepub fn with_charges(self, charges: u8) -> Self
pub fn with_charges(self, charges: u8) -> Self
Set the charges (for consumable mods like Requiem).
Sourcepub fn with_subtype(self, subtype: impl Into<String>) -> Self
pub fn with_subtype(self, subtype: impl Into<String>) -> Self
Set the item subtype (e.g., “blueprint”, “crafted”).
Sourcepub fn with_sculpture_stars(self, amber: u8, cyan: u8) -> Self
pub fn with_sculpture_stars(self, amber: u8, cyan: u8) -> Self
Set the installed stars (for Ayatan sculptures).
Sourcepub fn with_per_trade(self, per_trade: u32) -> Self
pub fn with_per_trade(self, per_trade: u32) -> Self
Set the minimum items per trade.
Make the order hidden (not visible to others).
Trait Implementations§
Source§impl Clone for CreateOrder
impl Clone for CreateOrder
Source§fn clone(&self) -> CreateOrder
fn clone(&self) -> CreateOrder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateOrder
impl Debug for CreateOrder
Auto Trait Implementations§
impl Freeze for CreateOrder
impl RefUnwindSafe for CreateOrder
impl Send for CreateOrder
impl Sync for CreateOrder
impl Unpin for CreateOrder
impl UnwindSafe for CreateOrder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more