pub struct CurrencyOps { /* private fields */ }Implementations§
Source§impl CurrencyOps
impl CurrencyOps
pub fn get_rate( &self, from: String, to: String, ) -> PhpResult<Option<ExchangeRate>>
pub fn list_rates(&self) -> PhpResult<Vec<ExchangeRate>>
pub fn set_rate( &self, from: String, to: String, rate: f64, ) -> PhpResult<ExchangeRate>
pub fn convert(&self, amount: f64, from: String, to: String) -> PhpResult<f64>
pub fn base_currency(&self) -> PhpResult<String>
pub fn enabled_currencies(&self) -> PhpResult<Vec<String>>
pub fn format(&self, amount: f64, currency: String) -> PhpResult<String>
Trait Implementations§
Source§impl Clone for CurrencyOps
impl Clone for CurrencyOps
Source§fn clone(&self) -> CurrencyOps
fn clone(&self) -> CurrencyOps
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<'a> FromZendObject<'a> for &'a CurrencyOps
impl<'a> FromZendObject<'a> for &'a CurrencyOps
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 CurrencyOps
impl<'a> FromZendObjectMut<'a> for &'a mut CurrencyOps
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> FromZval<'a> for &'a CurrencyOps
impl<'a> FromZval<'a> for &'a CurrencyOps
Source§impl<'a> FromZvalMut<'a> for &'a mut CurrencyOps
impl<'a> FromZvalMut<'a> for &'a mut CurrencyOps
Source§impl IntoZendObject for CurrencyOps
impl IntoZendObject for CurrencyOps
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 CurrencyOps
impl IntoZval for CurrencyOps
Source§impl RegisteredClass for CurrencyOps
impl RegisteredClass for CurrencyOps
Source§const CLASS_NAME: &'static str = "StateSet\\CurrencyOps"
const CLASS_NAME: &'static str = "StateSet\\CurrencyOps"
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 CurrencyOps
impl RefUnwindSafe for CurrencyOps
impl Send for CurrencyOps
impl Sync for CurrencyOps
impl Unpin for CurrencyOps
impl UnsafeUnpin for CurrencyOps
impl UnwindSafe for CurrencyOps
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