Struct librsnek::system::rc::impl_multithreaded::StrongRc 1.0.0
[−]
[src]
pub struct StrongRc<T> where
T: ?Sized, {
ptr: Shared<ArcInner<T>>,
}
A thread-safe reference-counting pointer.
Fields
ptr: Shared<ArcInner<T>>
Methods
impl<T> Arc<T>
[src]
fn new(data: T) -> Arc<T>
Constructs a new Arc<T>
.
fn try_unwrap(this: Arc<T>) -> Result<T, Arc<T>>
1.4.0
Returns the contained value, if the Arc
has exactly one strong reference.
fn into_raw(this: Arc<T>) -> *const T
1.17.0
Consumes the Arc
, returning the wrapped pointer.
unsafe fn from_raw(ptr: *const T) -> Arc<T>
1.17.0
Constructs an Arc
from a raw pointer.
impl<T> Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
fn downgrade(this: &Arc<T>) -> Weak<T>
1.4.0
Creates a new [Weak
][weak] pointer to this value.
fn weak_count(this: &Arc<T>) -> usize
1.15.0
Gets the number of [Weak
][weak] pointers to this value.
fn strong_count(this: &Arc<T>) -> usize
1.15.0
Gets the number of strong (Arc
) pointers to this value.
fn ptr_eq(this: &Arc<T>, other: &Arc<T>) -> bool
1.17.0
Returns true if the two Arc
s point to the same value (not
impl<T> Arc<T> where
T: Clone,
[src]
T: Clone,
impl<T> Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
fn get_mut(this: &mut Arc<T>) -> Option<&mut T>
1.4.0
Returns a mutable reference to the inner value, if there are
Trait Implementations
impl<C> Completer for Arc<C> where
C: Completer + ?Sized,
[src]
C: Completer + ?Sized,
fn complete(
&self,
line: &str,
pos: usize
) -> Result<(usize, Vec<String>), ReadlineError>
&self,
line: &str,
pos: usize
) -> Result<(usize, Vec<String>), ReadlineError>
fn update(&self, line: &mut LineBuffer, start: usize, elected: &str)
impl<T> UnwindSafe for Arc<T> where
T: RefUnwindSafe + ?Sized,
1.9.0[src]
T: RefUnwindSafe + ?Sized,
impl<T> Sync for Arc<T> where
T: Send + Sync + ?Sized,
[src]
T: Send + Sync + ?Sized,
impl<T> AsRef<T> for Arc<T> where
T: ?Sized,
1.5.0[src]
T: ?Sized,
fn as_ref(&self) -> &T
Performs the conversion.
impl<T> Display for Arc<T> where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> Borrow<T> for Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
fn borrow(&self) -> &T
Immutably borrows from an owned value.
impl<T> Hash for Arc<T> where
T: Hash + ?Sized,
[src]
T: Hash + ?Sized,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
H: Hasher,
Feeds this value into the given [Hasher
].
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
].
impl<T> Ord for Arc<T> where
T: Ord + ?Sized,
[src]
T: Ord + ?Sized,
impl<T> Eq for Arc<T> where
T: Eq + ?Sized,
[src]
T: Eq + ?Sized,
fn assert_receiver_is_total_eq(&self)
impl<T> From<T> for Arc<T>
1.6.0[src]
impl<T> Drop for Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
fn drop(&mut self)
Drops the Arc
.
impl<T, U> CoerceUnsized<Arc<U>> for Arc<T> where
T: Unsize<U> + ?Sized,
U: ?Sized,
[src]
T: Unsize<U> + ?Sized,
U: ?Sized,
impl<T> Clone for Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
fn clone(&self) -> Arc<T>
Makes a clone of the Arc
pointer.
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
.
impl<T> PartialOrd<Arc<T>> for Arc<T> where
T: PartialOrd<T> + ?Sized,
[src]
T: PartialOrd<T> + ?Sized,
fn partial_cmp(&self, other: &Arc<T>) -> Option<Ordering>
Partial comparison for two Arc
s.
fn lt(&self, other: &Arc<T>) -> bool
Less-than comparison for two Arc
s.
fn le(&self, other: &Arc<T>) -> bool
'Less than or equal to' comparison for two Arc
s.
fn gt(&self, other: &Arc<T>) -> bool
Greater-than comparison for two Arc
s.
fn ge(&self, other: &Arc<T>) -> bool
'Greater than or equal to' comparison for two Arc
s.
impl<T> Pointer for Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
impl<T> PartialEq<Arc<T>> for Arc<T> where
T: PartialEq<T> + ?Sized,
[src]
T: PartialEq<T> + ?Sized,
fn eq(&self, other: &Arc<T>) -> bool
Equality for two Arc
s.
fn ne(&self, other: &Arc<T>) -> bool
Inequality for two Arc
s.
impl<T> Debug for Arc<T> where
T: Debug + ?Sized,
[src]
T: Debug + ?Sized,
impl<T> Deref for Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> Default for Arc<T> where
T: Default,
[src]
T: Default,
impl<T> Send for Arc<T> where
T: Send + Sync + ?Sized,
[src]
T: Send + Sync + ?Sized,
impl<T> Encodable for Arc<T> where
T: Encodable,
[src]
T: Encodable,
impl<T> Decodable for Arc<T> where
T: Decodable + Send + Sync,
[src]
T: Decodable + Send + Sync,
impl<T> KV for Arc<T> where
T: KV + ?Sized,
[src]
T: KV + ?Sized,
impl<D> Drain for Arc<D> where
D: Drain + ?Sized,
[src]
D: Drain + ?Sized,
type Ok = <D as Drain>::Ok
type Err = <D as Drain>::Err
fn log(
&self,
record: &Record,
o: &OwnedKVList
) -> Result<<Arc<D> as Drain>::Ok, <D as Drain>::Err>
&self,
record: &Record,
o: &OwnedKVList
) -> Result<<Arc<D> as Drain>::Ok, <D as Drain>::Err>
impl<T> Value for Arc<T> where
T: Value + ?Sized,
[src]
T: Value + ?Sized,