pub enum ObserverError {
Interface(InterfaceError),
MarkedForDeletion,
NetProp(NetPropError),
NotObserving(ObserverMode),
NotTfPlayer,
UnknownMode(c_int),
}Available on crate feature
tf2 only.Expand description
Why an observer operation failed.
Variants§
Interface(InterfaceError)
A required engine interface is unavailable.
MarkedForDeletion
The player is already marked for deletion.
NetProp(NetPropError)
A networked variable could not be read or written.
NotObserving(ObserverMode)
The player watches in a mode that cannot turn into roaming: not spectating at all, or in the death or freeze cam that follows a death.
NotTfPlayer
The entity is not a TF2 player, or the server does not run TF2.
UnknownMode(c_int)
The player’s m_iObserverMode is not one of TF2’s observer modes.
Trait Implementations§
Source§impl Debug for ObserverError
impl Debug for ObserverError
Source§impl Display for ObserverError
impl Display for ObserverError
Source§impl Error for ObserverError
impl Error for ObserverError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<InterfaceError> for ObserverError
impl From<InterfaceError> for ObserverError
Source§fn from(source: InterfaceError) -> Self
fn from(source: InterfaceError) -> Self
Converts to this type from the input type.
Source§impl From<NetPropError> for ObserverError
impl From<NetPropError> for ObserverError
Source§fn from(source: NetPropError) -> Self
fn from(source: NetPropError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ObserverError
impl RefUnwindSafe for ObserverError
impl Send for ObserverError
impl Sync for ObserverError
impl Unpin for ObserverError
impl UnsafeUnpin for ObserverError
impl UnwindSafe for ObserverError
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
Mutably borrows from an owned value. Read more