pub struct Service {
services: Arc<OnceServices>,
notification_increment_mutex: MutexMap<(OwnedRoomId, OwnedUserId), ()>,
highlight_increment_mutex: MutexMap<(OwnedRoomId, OwnedUserId), ()>,
db: Data,
suppressed: SuppressedQueue,
sent_badges: SentBadges,
}Fields§
§services: Arc<OnceServices>§notification_increment_mutex: MutexMap<(OwnedRoomId, OwnedUserId), ()>§highlight_increment_mutex: MutexMap<(OwnedRoomId, OwnedUserId), ()>§db: Data§suppressed: SuppressedQueue§sent_badges: SentBadgesImplementations§
Source§impl Service
impl Service
Sourcepub(crate) async fn append_pdu(&self, pdu_id: RawPduId, pdu: &Pdu) -> Result
pub(crate) async fn append_pdu(&self, pdu_id: RawPduId, pdu: &Pdu) -> Result
Called by timeline append_pdu.
Source§impl Service
impl Service
async fn increment_notificationcount(&self, room_id: &RoomId, user_id: &UserId)
Source§impl Service
impl Service
async fn increment_highlightcount(&self, room_id: &RoomId, user_id: &UserId)
Source§impl Service
impl Service
async fn increment_thread_notificationcount( &self, room_id: &RoomId, user_id: &UserId, thread_root: &EventId, )
Source§impl Service
impl Service
async fn increment_thread_highlightcount( &self, room_id: &RoomId, user_id: &UserId, thread_root: &EventId, )
Source§impl Service
impl Service
Sourcepub(super) fn sent_badge(&self, user_id: &UserId, pushkey: &str) -> Option<UInt>
pub(super) fn sent_badge(&self, user_id: &UserId, pushkey: &str) -> Option<UInt>
Return the unread total last accepted by this pusher’s gateway.
None means no delivery has been confirmed since startup, and the caller
must send rather than assume agreement.
Source§impl Service
impl Service
Sourcepub(super) fn record_sent_badge(
&self,
user_id: &UserId,
pushkey: &str,
unread: UInt,
)
pub(super) fn record_sent_badge( &self, user_id: &UserId, pushkey: &str, unread: UInt, )
Record the unread total a pusher’s gateway just accepted.
Call only after a successful delivery; recording an attempt would make a failed send look reconciled and suppress the retry’s refresh.
Source§impl Service
impl Service
Sourcepub(super) fn forget_sent_badge(&self, user_id: &UserId, pushkey: &str)
pub(super) fn forget_sent_badge(&self, user_id: &UserId, pushkey: &str)
Forget the delivery record for one pusher.
A deleted or replaced pusher leaves the device state unknown, so the next refresh must send unconditionally.
Source§impl Service
impl Service
Sourcepub async fn reset_notification_counts(
&self,
user_id: &UserId,
room_id: &RoomId,
)
pub async fn reset_notification_counts( &self, user_id: &UserId, room_id: &RoomId, )
Reset the room’s main-timeline notification counts.
The last-read stamp gates sync output; callers dispatch the badge refresh after every reset.
Source§impl Service
impl Service
Sourcepub async fn reset_thread_notification_counts(
&self,
user_id: &UserId,
room_id: &RoomId,
thread_root: &EventId,
)
pub async fn reset_thread_notification_counts( &self, user_id: &UserId, room_id: &RoomId, thread_root: &EventId, )
Reset counts for a single thread within a room.
The last-read stamp gates sync output.
Source§impl Service
impl Service
Sourcepub async fn clear_all_thread_notification_counts(
&self,
user_id: &UserId,
room_id: &RoomId,
)
pub async fn clear_all_thread_notification_counts( &self, user_id: &UserId, room_id: &RoomId, )
Clear all per-thread notification state for this user and room.
The Interfix prefix excludes the main row. The notification-count sweep
runs under the increment mutex so a concurrent read-modify-write cannot
resurrect a cleared row.
Source§impl Service
impl Service
Sourcepub async fn reset_notification_counts_for_thread(
&self,
user_id: &UserId,
room_id: &RoomId,
thread: &ReceiptThread,
)
pub async fn reset_notification_counts_for_thread( &self, user_id: &UserId, room_id: &RoomId, thread: &ReceiptThread, )
Dispatcher: route a receipt’s ReceiptThread to the matching reset path.
Unthreaded clears all room and thread counts; Main clears only the
main-timeline counts; Thread(id) clears just that thread.
Source§impl Service
impl Service
pub async fn notification_count( &self, user_id: &UserId, room_id: &RoomId, ) -> u64
Source§impl Service
impl Service
Sourcepub async fn global_notification_count(&self, user_id: &UserId) -> u64
pub async fn global_notification_count(&self, user_id: &UserId) -> u64
Return the user’s account-wide unread notification count.
Joined main and thread rows contribute to a saturating total.
Source§impl Service
impl Service
pub async fn highlight_count(&self, user_id: &UserId, room_id: &RoomId) -> u64
Source§impl Service
impl Service
Sourcepub async fn thread_notification_counts(
&self,
user_id: &UserId,
room_id: &RoomId,
) -> BTreeMap<OwnedEventId, (u64, u64)>
pub async fn thread_notification_counts( &self, user_id: &UserId, room_id: &RoomId, ) -> BTreeMap<OwnedEventId, (u64, u64)>
Per-thread (notification, highlight) counts for one room and user.
Interfix excludes the legacy 2-tuple main row from the scan; only
3-tuple (user, room, root) rows match.
Source§impl Service
impl Service
pub async fn last_notification_read( &self, user_id: &UserId, room_id: &RoomId, ) -> Result<u64>
Source§impl Service
impl Service
Sourcepub async fn thread_last_notification_reads(
&self,
user_id: &UserId,
room_id: &RoomId,
) -> BTreeMap<OwnedEventId, u64>
pub async fn thread_last_notification_reads( &self, user_id: &UserId, room_id: &RoomId, ) -> BTreeMap<OwnedEventId, u64>
Per-thread last-read counts for one room and user. Interfix keeps the
scan to 3-tuple (room, user, root) rows; the legacy 2-tuple main row
is excluded by construction and lives behind last_notification_read.
Source§impl Service
impl Service
pub async fn delete_room_notification_read(&self, room_id: &RoomId) -> Result
Source§impl Service
impl Service
pub async fn send_push_notice<E>(
&self,
user_id: &UserId,
pusher: &Pusher,
ruleset: &Ruleset,
event: &E,
) -> Resultwhere
E: Event,
Source§impl Service
impl Service
Sourcepub async fn send_badge_notice(
&self,
user_id: &UserId,
pusher: &Pusher,
) -> Result
pub async fn send_badge_notice( &self, user_id: &UserId, pusher: &Pusher, ) -> Result
Send an account-wide counts-only notification to a push gateway.
Enabled HTTP pushers emit the request, including an explicit zero. The delivery is skipped only when the gateway is known to hold the current total already; an unknown gateway is always sent to.
Source§impl Service
impl Service
fn prepare_http_pusher( &self, pusher: &Pusher, http: &HttpPusherData, ) -> Result<Device>
Source§impl Service
impl Service
Sourceasync fn send_http_notice(
&self,
user_id: &UserId,
pusher: &Pusher,
http: &HttpPusherData,
notify: Notification,
unread: Option<UInt>,
) -> Result
async fn send_http_notice( &self, user_id: &UserId, pusher: &Pusher, http: &HttpPusherData, notify: Notification, unread: Option<UInt>, ) -> Result
Deliver one notification to the pusher’s gateway and honor its verdict.
A pushkey the gateway names in rejected has its pusher removed. unread
names the counts value on the wire; it is recorded as delivered only after
the gateway accepts, so a failed or rejected send leaves the next refresh
unconditional.
Source§impl Service
impl Service
Sourcepub fn queue_suppressed_push(
&self,
user_id: &UserId,
pushkey: &str,
room_id: &RoomId,
pdu_id: RawPduId,
) -> bool
pub fn queue_suppressed_push( &self, user_id: &UserId, pushkey: &str, room_id: &RoomId, pdu_id: RawPduId, ) -> bool
Enqueue a PDU for later push delivery when suppression is active.
Source§impl Service
impl Service
Sourcepub fn clear_suppressed_room(&self, user_id: &UserId, room_id: &RoomId) -> usize
pub fn clear_suppressed_room(&self, user_id: &UserId, room_id: &RoomId) -> usize
Clear suppressed PDUs for a specific room (across all pushkeys).
Source§impl Service
impl Service
Sourcepub fn clear_suppressed_pushkey(&self, user_id: &UserId, pushkey: &str) -> usize
pub fn clear_suppressed_pushkey(&self, user_id: &UserId, pushkey: &str) -> usize
Clear suppressed PDUs for a specific pushkey.
Source§impl Service
impl Service
pub async fn set_pusher( &self, sender: &UserId, sender_device: &DeviceId, pusher: &PusherAction, ) -> Result
Source§impl Service
impl Service
fn set_pusher_post( &self, sender: &UserId, sender_device: &DeviceId, action: &PusherAction, pusher: &Pusher, ) -> Result
Source§impl Service
impl Service
pub async fn get_device_pushkeys( &self, sender: &UserId, device_id: &DeviceId, ) -> Vec<String>
Source§impl Service
impl Service
pub async fn get_pusher_device(&self, pushkey: &str) -> Result<OwnedDeviceId>
Source§impl Service
impl Service
pub async fn get_pusher(&self, sender: &UserId, pushkey: &str) -> Result<Pusher>
Source§impl Service
impl Service
pub fn get_pushkeys<'a>( &'a self, sender: &'a UserId, ) -> impl Stream<Item = &str> + Send + 'a
Source§impl Service
impl Service
pub async fn get_actions<'a>(&self, __arg1: Evaluate<'a, '_>) -> &'a [Action]
Source§impl Service
impl Service
Resolve the events an event relates to, for the MSC3664 push condition.
None while msc3664_related_event_match is disabled, which leaves every
MSC3664 condition unable to match. The relations do not vary by recipient,
so the append path resolves them once for the whole room; the push-notice
path resolves them per notice, since it holds one event at a time.
Trait Implementations§
Source§impl Service for Service
impl Service for Service
Source§fn build(args: &Args<'_>) -> Result<Arc<Self>>
fn build(args: &Args<'_>) -> Result<Arc<Self>>
Source§fn name(&self) -> &str
fn name(&self) -> &str
crate::service::make_name(std::module_path!())Source§fn worker<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
fn worker<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
Source§fn interrupt<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn interrupt<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn memory_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
_out: &'life1 mut (dyn Write + Send),
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn memory_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
_out: &'life1 mut (dyn Write + Send),
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn unconstrained(&self) -> bool
fn unconstrained(&self) -> bool
Auto Trait Implementations§
impl !Freeze for Service
impl !RefUnwindSafe for Service
impl !UnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
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
Source§impl<T> ExpectInto for T
impl<T> ExpectInto for T
Source§impl<T> Expected for T
impl<T> Expected for T
Source§fn expected_add(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedAdd,
fn expected_add(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedAdd,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_sub(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedSub,
fn expected_sub(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedSub,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_mul(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedMul,
fn expected_mul(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedMul,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_div(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedDiv,
fn expected_div(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedDiv,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_rem(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedRem,
fn expected_rem(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedRem,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> JsonCastable<CanonicalJsonValue> for T
impl<T> JsonCastable<Value> for T
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read moreSource§impl<T> Tried for T
impl<T> Tried for T
Source§fn try_add(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedAdd,
fn try_add(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedAdd,
rhs with checked arithmetic. Read moreSource§fn try_sub(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedSub,
fn try_sub(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedSub,
rhs with checked arithmetic. Read moreSource§fn try_mul(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedMul,
fn try_mul(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedMul,
rhs with checked arithmetic. Read more