MjHeadChild

Enum MjHeadChild 

Source
pub enum MjHeadChild {
    Comment(Comment),
    MjAttributes(MjAttributes),
    MjBreakpoint(MjBreakpoint),
    MjFont(MjFont),
    MjInclude(MjIncludeHead),
    MjPreview(MjPreview),
    MjRaw(MjRaw),
    MjStyle(MjStyle),
    MjTitle(MjTitle),
}

Variants§

§

Comment(Comment)

§

MjAttributes(MjAttributes)

§

MjBreakpoint(MjBreakpoint)

§

MjFont(MjFont)

§

MjInclude(MjIncludeHead)

§

MjPreview(MjPreview)

§

MjRaw(MjRaw)

§

MjStyle(MjStyle)

§

MjTitle(MjTitle)

Implementations§

Source§

impl MjHeadChild

Source

pub fn is_comment(&self) -> bool

Returns true if this is a MjHeadChild::Comment, otherwise false

Source

pub fn as_comment_mut(&mut self) -> Option<&mut Comment>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::Comment, otherwise None

Source

pub fn as_comment(&self) -> Option<&Comment>

Optionally returns references to the inner fields if this is a MjHeadChild::Comment, otherwise None

Source

pub fn into_comment(self) -> Result<Comment, Self>

Returns the inner fields if this is a MjHeadChild::Comment, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_attributes(&self) -> bool

Returns true if this is a MjHeadChild::MjAttributes, otherwise false

Source

pub fn as_mj_attributes_mut(&mut self) -> Option<&mut MjAttributes>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjAttributes, otherwise None

Source

pub fn as_mj_attributes(&self) -> Option<&MjAttributes>

Optionally returns references to the inner fields if this is a MjHeadChild::MjAttributes, otherwise None

Source

pub fn into_mj_attributes(self) -> Result<MjAttributes, Self>

Returns the inner fields if this is a MjHeadChild::MjAttributes, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_breakpoint(&self) -> bool

Returns true if this is a MjHeadChild::MjBreakpoint, otherwise false

Source

pub fn as_mj_breakpoint_mut(&mut self) -> Option<&mut MjBreakpoint>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjBreakpoint, otherwise None

Source

pub fn as_mj_breakpoint(&self) -> Option<&MjBreakpoint>

Optionally returns references to the inner fields if this is a MjHeadChild::MjBreakpoint, otherwise None

Source

pub fn into_mj_breakpoint(self) -> Result<MjBreakpoint, Self>

Returns the inner fields if this is a MjHeadChild::MjBreakpoint, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_font(&self) -> bool

Returns true if this is a MjHeadChild::MjFont, otherwise false

Source

pub fn as_mj_font_mut(&mut self) -> Option<&mut MjFont>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjFont, otherwise None

Source

pub fn as_mj_font(&self) -> Option<&MjFont>

Optionally returns references to the inner fields if this is a MjHeadChild::MjFont, otherwise None

Source

pub fn into_mj_font(self) -> Result<MjFont, Self>

Returns the inner fields if this is a MjHeadChild::MjFont, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_include(&self) -> bool

Returns true if this is a MjHeadChild::MjInclude, otherwise false

Source

pub fn as_mj_include_mut(&mut self) -> Option<&mut MjIncludeHead>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjInclude, otherwise None

Source

pub fn as_mj_include(&self) -> Option<&MjIncludeHead>

Optionally returns references to the inner fields if this is a MjHeadChild::MjInclude, otherwise None

Source

pub fn into_mj_include(self) -> Result<MjIncludeHead, Self>

Returns the inner fields if this is a MjHeadChild::MjInclude, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_preview(&self) -> bool

Returns true if this is a MjHeadChild::MjPreview, otherwise false

Source

pub fn as_mj_preview_mut(&mut self) -> Option<&mut MjPreview>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjPreview, otherwise None

Source

pub fn as_mj_preview(&self) -> Option<&MjPreview>

Optionally returns references to the inner fields if this is a MjHeadChild::MjPreview, otherwise None

Source

pub fn into_mj_preview(self) -> Result<MjPreview, Self>

Returns the inner fields if this is a MjHeadChild::MjPreview, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_raw(&self) -> bool

Returns true if this is a MjHeadChild::MjRaw, otherwise false

Source

pub fn as_mj_raw_mut(&mut self) -> Option<&mut MjRaw>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjRaw, otherwise None

Source

pub fn as_mj_raw(&self) -> Option<&MjRaw>

Optionally returns references to the inner fields if this is a MjHeadChild::MjRaw, otherwise None

Source

pub fn into_mj_raw(self) -> Result<MjRaw, Self>

Returns the inner fields if this is a MjHeadChild::MjRaw, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_style(&self) -> bool

Returns true if this is a MjHeadChild::MjStyle, otherwise false

Source

pub fn as_mj_style_mut(&mut self) -> Option<&mut MjStyle>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjStyle, otherwise None

Source

pub fn as_mj_style(&self) -> Option<&MjStyle>

Optionally returns references to the inner fields if this is a MjHeadChild::MjStyle, otherwise None

Source

pub fn into_mj_style(self) -> Result<MjStyle, Self>

Returns the inner fields if this is a MjHeadChild::MjStyle, otherwise returns back the enum in the Err case of the result

Source

pub fn is_mj_title(&self) -> bool

Returns true if this is a MjHeadChild::MjTitle, otherwise false

Source

pub fn as_mj_title_mut(&mut self) -> Option<&mut MjTitle>

Optionally returns mutable references to the inner fields if this is a MjHeadChild::MjTitle, otherwise None

Source

pub fn as_mj_title(&self) -> Option<&MjTitle>

Optionally returns references to the inner fields if this is a MjHeadChild::MjTitle, otherwise None

Source

pub fn into_mj_title(self) -> Result<MjTitle, Self>

Returns the inner fields if this is a MjHeadChild::MjTitle, otherwise returns back the enum in the Err case of the result

Trait Implementations§

Source§

impl Clone for MjHeadChild

Source§

fn clone(&self) -> MjHeadChild

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MjHeadChild

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MjHeadChild

Source§

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<Component<PhantomData<CommentTag>, (), String>> for MjHeadChild

Source§

fn from(v: Comment) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjAttributesTag>, (), Vec<MjAttributesChild>>> for MjHeadChild

Source§

fn from(v: MjAttributes) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjBreakpointTag>, MjBreakpointAttributes, ()>> for MjHeadChild

Source§

fn from(v: MjBreakpoint) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjFontTag>, MjFontAttributes, ()>> for MjHeadChild

Source§

fn from(v: MjFont) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjPreviewTag>, (), OneOrMany<MjPreviewChild>>> for MjHeadChild

Source§

fn from(v: MjPreview) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjRawTag>, (), Vec<MjRawChild>>> for MjHeadChild

Source§

fn from(v: MjRaw) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjStyleTag>, MjStyleAttributes, String>> for MjHeadChild

Source§

fn from(v: MjStyle) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<Component<PhantomData<MjTitleTag>, (), String>> for MjHeadChild

Source§

fn from(v: MjTitle) -> MjHeadChild

Converts to this type from the input type.
Source§

impl From<MjIncludeHead> for MjHeadChild

Source§

fn from(v: MjIncludeHead) -> MjHeadChild

Converts to this type from the input type.
Source§

impl Printable for MjHeadChild

Source§

fn print<P: Printer>(&self, __enum_dispatch_arg_0: &mut P) -> Result

Source§

fn print_dense(&self) -> Result<String, Error>

Source§

fn print_pretty(&self) -> Result<String, Error>

Source§

impl Serialize for MjHeadChild

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryInto<Component<PhantomData<CommentTag>, (), String>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Comment, <Self as TryInto<Comment>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjAttributesTag>, (), Vec<MjAttributesChild>>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<MjAttributes, <Self as TryInto<MjAttributes>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjBreakpointTag>, MjBreakpointAttributes, ()>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<MjBreakpoint, <Self as TryInto<MjBreakpoint>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjFontTag>, MjFontAttributes, ()>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<MjFont, <Self as TryInto<MjFont>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjPreviewTag>, (), OneOrMany<MjPreviewChild>>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<MjPreview, <Self as TryInto<MjPreview>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjRawTag>, (), Vec<MjRawChild>>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<MjRaw, <Self as TryInto<MjRaw>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjStyleTag>, MjStyleAttributes, String>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<MjStyle, <Self as TryInto<MjStyle>>::Error>

Performs the conversion.
Source§

impl TryInto<Component<PhantomData<MjTitleTag>, (), String>> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<MjTitle, <Self as TryInto<MjTitle>>::Error>

Performs the conversion.
Source§

impl TryInto<MjIncludeHead> for MjHeadChild

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<MjIncludeHead, <Self as TryInto<MjIncludeHead>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,