pub struct StockStrings {
translated_stockstrings: Arc<RwLock<HashMap<usize, String>>>,
}
Expand description
Storage for string translations.
Fields§
§translated_stockstrings: Arc<RwLock<HashMap<usize, String>>>
Map from stock string ID to the translation.
Implementations§
source§impl StockStrings
impl StockStrings
async fn translated(&self, id: StockMessage) -> String
async fn set_stock_translation( &self, id: StockMessage, stockstring: String, ) -> Result<()>
Trait Implementations§
source§impl Clone for StockStrings
impl Clone for StockStrings
source§fn clone(&self) -> StockStrings
fn clone(&self) -> StockStrings
Returns a copy 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 StockStrings
impl Debug for StockStrings
Auto Trait Implementations§
impl Freeze for StockStrings
impl !RefUnwindSafe for StockStrings
impl Send for StockStrings
impl Sync for StockStrings
impl Unpin for StockStrings
impl !UnwindSafe for StockStrings
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)