[−][src]Enum fastobo::ast::EntityFrame
An entity frame, either for a term, an instance, or a typedef.
Variants
Term(TermFrame)
Typedef(TypedefFrame)
Instance(InstanceFrame)
Methods
impl EntityFrame
[src]
pub fn as_term_frame(&self) -> Option<&TermFrame>
[src]
Return the TermFrame
if the entity frame is one, or None
.
Use this function in conjunction with Iterator::flat_map
to extract
all term frames from an iterator of EntityFrame
references:
let doc = fastobo::from_file("tests/data/ms.obo").unwrap(); let terms: Vec<&TermFrame> = doc .entities() .iter() .flat_map(EntityFrame::as_term_frame) .collect();
pub fn as_typedef_frame(&self) -> Option<&TypedefFrame>
[src]
Return the TypedefFrame
if the entity frame is one, or None
.
pub fn as_instance_frame(&self) -> Option<&InstanceFrame>
[src]
Return the InstanceFrame
if the entity frame is one, or None
.
Trait Implementations
impl<'i> FromPair<'i> for EntityFrame
[src]
const RULE: Rule
[src]
unsafe fn from_pair_unchecked(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
impl Orderable for EntityFrame
[src]
impl Identified for EntityFrame
[src]
impl Eq for EntityFrame
[src]
impl Clone for EntityFrame
[src]
fn clone(&self) -> EntityFrame
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<EntityFrame> for EntityFrame
[src]
fn eq(&self, other: &EntityFrame) -> bool
[src]
fn ne(&self, other: &EntityFrame) -> bool
[src]
impl From<TermFrame> for EntityFrame
[src]
impl From<TypedefFrame> for EntityFrame
[src]
fn from(frame: TypedefFrame) -> Self
[src]
impl From<InstanceFrame> for EntityFrame
[src]
fn from(frame: InstanceFrame) -> Self
[src]
impl Hash for EntityFrame
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Debug for EntityFrame
[src]
impl Display for EntityFrame
[src]
impl FromStr for EntityFrame
[src]
Auto Trait Implementations
impl Send for EntityFrame
impl Unpin for EntityFrame
impl Sync for EntityFrame
impl UnwindSafe for EntityFrame
impl RefUnwindSafe for EntityFrame
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,