Enum synapse_rpc::resource::Resource
[−]
[src]
pub enum Resource { Server(Server), Torrent(Torrent), Piece(Piece), File(File), Peer(Peer), Tracker(Tracker), }
Variants
Server(Server)
Torrent(Torrent)
Piece(Piece)
File(File)
Peer(Peer)
Tracker(Tracker)
Methods
impl Resource
[src]
pub fn id(&self) -> &str
[src]
pub fn torrent_id(&self) -> Option<&str>
[src]
pub fn kind(&self) -> ResourceKind
[src]
pub fn user_data(&mut self) -> &mut Value
[src]
pub fn as_server(&self) -> &Server
[src]
pub fn as_torrent(&self) -> &Torrent
[src]
pub fn as_torrent_mut(&mut self) -> &mut Torrent
[src]
pub fn as_file(&self) -> &File
[src]
pub fn as_piece(&self) -> &Piece
[src]
pub fn as_peer(&self) -> &Peer
[src]
pub fn as_tracker(&self) -> &Tracker
[src]
pub fn update(&mut self, update: SResourceUpdate)
[src]
Trait Implementations
impl Debug for Resource
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Resource
[src]
fn clone(&self) -> Resource
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Resource
[src]
fn eq(&self, __arg_0: &Resource) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Resource) -> bool
[src]
This method tests for !=
.
impl Display for Resource
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more