pub struct MediaEntityDesc {
pub id: EntityId,
pub name: String,
pub type: MediaEntityFunctions,
pub flags: MediaEntityFlags,
pub pads: usize,
pub links: usize,
}Fields§
§id: EntityIdEntity ID, set by the application. When the ID is or’ed with MEDIA_ENT_ID_FLAG_NEXT, the driver clears the flag and returns the first entity with a larger ID. Do not expect that the ID will always be the same for each instance of the device. In other words, do not hardcode entity IDs in an application.
name: StringEntity name. This name must be unique within the media topology.
type: MediaEntityFunctionsEntity type.
flags: MediaEntityFlagsEntity flags.
pads: usizeNumber of pads
links: usizeTotal number of outbound links. Inbound links are not counted in this field.
Implementations§
Source§impl MediaEntityDesc
impl MediaEntityDesc
pub fn from_fd<F>(fd: F, entity: EntityId) -> Result<Self>where
F: AsRawFd,
pub fn id(&self) -> EntityId
pub fn name(&self) -> &str
pub fn type(&self) -> MediaEntityFunctions
pub fn flags(&self) -> MediaEntityFlags
pub fn pads(&self) -> usize
pub fn links(&self) -> usize
Trait Implementations§
Source§impl Clone for MediaEntityDesc
impl Clone for MediaEntityDesc
Source§fn clone(&self) -> MediaEntityDesc
fn clone(&self) -> MediaEntityDesc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MediaEntityDesc
impl Debug for MediaEntityDesc
Source§impl<'de> Deserialize<'de> for MediaEntityDesc
impl<'de> Deserialize<'de> for MediaEntityDesc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<media_entity_desc> for MediaEntityDesc
impl From<media_entity_desc> for MediaEntityDesc
Source§fn from(desc: media_entity_desc) -> Self
fn from(desc: media_entity_desc) -> Self
Converts to this type from the input type.
Source§impl Ord for MediaEntityDesc
impl Ord for MediaEntityDesc
Source§fn cmp(&self, other: &MediaEntityDesc) -> Ordering
fn cmp(&self, other: &MediaEntityDesc) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MediaEntityDesc
impl PartialEq for MediaEntityDesc
Source§impl PartialOrd for MediaEntityDesc
impl PartialOrd for MediaEntityDesc
Source§impl Serialize for MediaEntityDesc
impl Serialize for MediaEntityDesc
impl Eq for MediaEntityDesc
impl StructuralPartialEq for MediaEntityDesc
Auto Trait Implementations§
impl Freeze for MediaEntityDesc
impl RefUnwindSafe for MediaEntityDesc
impl Send for MediaEntityDesc
impl Sync for MediaEntityDesc
impl Unpin for MediaEntityDesc
impl UnsafeUnpin for MediaEntityDesc
impl UnwindSafe for MediaEntityDesc
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