[−][src]Struct qbittorrent::data::Hash
Methods from Deref<Target = String>
pub fn as_str(&self) -> &str
1.7.0[src]
Extracts a string slice containing the entire String
.
Examples
Basic usage:
let s = String::from("foo"); assert_eq!("foo", s.as_str());
pub fn capacity(&self) -> usize
1.0.0[src]
Returns this String
's capacity, in bytes.
Examples
Basic usage:
let s = String::with_capacity(10); assert!(s.capacity() >= 10);
pub fn as_bytes(&self) -> &[u8]
1.0.0[src]
Returns a byte slice of this String
's contents.
The inverse of this method is from_utf8
.
Examples
Basic usage:
let s = String::from("hello"); assert_eq!(&[104, 101, 108, 108, 111], s.as_bytes());
pub fn len(&self) -> usize
1.0.0[src]
Returns the length of this String
, in bytes, not char
s or
graphemes. In other words, it may not be what a human considers the
length of the string.
Examples
Basic usage:
let a = String::from("foo"); assert_eq!(a.len(), 3); let fancy_f = String::from("ƒoo"); assert_eq!(fancy_f.len(), 4); assert_eq!(fancy_f.chars().count(), 3);
pub fn is_empty(&self) -> bool
1.0.0[src]
Returns true
if this String
has a length of zero, and false
otherwise.
Examples
Basic usage:
let mut v = String::new(); assert!(v.is_empty()); v.push('a'); assert!(!v.is_empty());
Trait Implementations
impl Clone for Hash
[src]
impl Debug for Hash
[src]
impl Default for Hash
[src]
impl Deref for Hash
[src]
impl<'de> Deserialize<'de> for Hash
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<String> for Hash
[src]
impl Pause<Api> for Hash
[src]
fn pause<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Resume<Api> for Hash
[src]
fn resume<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Serialize for Hash
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Tags<Api, [String]> for Hash
[src]
fn add_tag<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
api: &'life1 Api,
tags: &'life2 [String]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
api: &'life1 Api,
tags: &'life2 [String]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
impl TorrentData<Api> for Hash
[src]
fn properties<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<TorrentProperties, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<TorrentProperties, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn trackers<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<Vec<Tracker>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
api: &'life1 Api
) -> Pin<Box<dyn Future<Output = Result<Vec<Tracker>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn contents<'a, 'async_trait>(
&'a self,
api: &'a Api
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentInfo<'a>>, Error>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
&'a self,
api: &'a Api
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentInfo<'a>>, Error>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,