pub struct Inventory { /* private fields */ }Implementations§
Source§impl Inventory
impl Inventory
pub fn create( &self, sku: String, quantity: i32, reorder_point: Option<i32>, reorder_quantity: Option<i32>, ) -> PhpResult<InventoryItem>
pub fn get(&self, id: String) -> PhpResult<Option<InventoryItem>>
pub fn get_by_sku(&self, sku: String) -> PhpResult<Option<InventoryItem>>
pub fn list(&self) -> PhpResult<Vec<InventoryItem>>
pub fn adjust( &self, id: String, adjustment: i32, reason: Option<String>, ) -> PhpResult<InventoryItem>
pub fn reserve( &self, id: String, quantity: i32, order_id: Option<String>, ) -> PhpResult<InventoryItem>
pub fn release(&self, id: String, quantity: i32) -> PhpResult<InventoryItem>
Trait Implementations§
Source§impl<'a> FromZendObject<'a> for &'a Inventory
impl<'a> FromZendObject<'a> for &'a Inventory
Source§fn from_zend_object(obj: &'a ZendObject) -> Result<Self>
fn from_zend_object(obj: &'a ZendObject) -> Result<Self>
Extracts
Self from the source ZendObject.Source§impl<'a> FromZendObjectMut<'a> for &'a mut Inventory
impl<'a> FromZendObjectMut<'a> for &'a mut Inventory
Source§fn from_zend_object_mut(obj: &'a mut ZendObject) -> Result<Self>
fn from_zend_object_mut(obj: &'a mut ZendObject) -> Result<Self>
Extracts
Self from the source ZendObject.Source§impl<'a> FromZvalMut<'a> for &'a mut Inventory
impl<'a> FromZvalMut<'a> for &'a mut Inventory
Source§impl IntoZendObject for Inventory
impl IntoZendObject for Inventory
Source§fn into_zend_object(self) -> Result<ZBox<ZendObject>>
fn into_zend_object(self) -> Result<ZBox<ZendObject>>
Attempts to convert
self into a Zend object.Source§impl IntoZval for Inventory
impl IntoZval for Inventory
Source§impl RegisteredClass for Inventory
impl RegisteredClass for Inventory
Source§const CLASS_NAME: &'static str = "StateSet\\Inventory"
const CLASS_NAME: &'static str = "StateSet\\Inventory"
PHP class name of the registered class.
Source§const CONSTRUCTOR: Option<ConstructorMeta<Self>> = None
const CONSTRUCTOR: Option<ConstructorMeta<Self>> = None
Optional class constructor.
Source§fn get_metadata() -> &'static ClassMetadata<Self>
fn get_metadata() -> &'static ClassMetadata<Self>
Returns a reference to the class metadata, which stores the class entry
and handlers. Read more
Auto Trait Implementations§
impl Freeze for Inventory
impl RefUnwindSafe for Inventory
impl Send for Inventory
impl Sync for Inventory
impl Unpin for Inventory
impl UnsafeUnpin for Inventory
impl UnwindSafe for Inventory
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