pub struct Capability {
pub cap_type: CapabilitySetType,
pub message: Component,
}
Expand description
A capability Composed by a type and structured component
§Example
ⓘ
use rdp::core::capability::{Capability, CapabilitySetType};
let capability = Capability {
cap_type: CapabilitySetType::CapstypePointer,
message: component![
"colorPointerFlag" => U16::LE(0),
"colorPointerCacheSize" => U16::LE(20)
]
};
Fields§
§cap_type: CapabilitySetType
§message: Component
Implementations§
Source§impl Capability
impl Capability
Sourcepub fn from_capability_set(capability_set: &Component) -> RdpResult<Capability>
pub fn from_capability_set(capability_set: &Component) -> RdpResult<Capability>
Parse the capability from a parent capability_set
§Example
#[macro_use]
let example = capability_set(Some(ts_general_capability_set(Some(4))));
let general_capability = Capability::from_capability_set(&example).unwrap();
assert_eq!(cast!(DataType::U16, general_capability.message["extraFlags"]).unwrap(), 4)
Auto Trait Implementations§
impl Freeze for Capability
impl !RefUnwindSafe for Capability
impl Send for Capability
impl !Sync for Capability
impl Unpin for Capability
impl !UnwindSafe for Capability
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