ATermFactory

Struct ATermFactory 

Source
pub struct ATermFactory<B, H: BuildHasher> { /* private fields */ }

Implementations§

Source§

impl<'s, B, H: BuildHasher + Default> ATermFactory<B, H>

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<'s, B, H> ATermFactory<'s> for ATermFactory<B, H>
where B: 's + Clone, H: 's + BuildHasher + Default,

Source§

type ATerm = ATerm<'s, B>

The ATerm the factory builds
Source§

type ATermRef = Rc<ATerm<'s, B>>

The reference to an ATerm that’s returned. You usually want these to be cheaply cloneable!
Source§

fn application<I, S>(&'s self, constructor: S, children: I) -> Self::ATermRef
where I: IntoIterator<Item = Self::ATermRef>, S: Into<Cow<'s, str>>,

Source§

fn with_annos<A>(&'s self, term: Self::ATermRef, annos: A) -> Self::ATermRef
where A: IntoIterator<Item = Self::ATermRef>,

Source§

fn int(&'s self, value: i32) -> Self::ATermRef

Source§

fn string<S>(&'s self, value: S) -> Self::ATermRef
where S: Into<Cow<'s, str>>,

The string variant in ATerms is represented as an application with zero children!
Source§

fn tuple<I>(&'s self, children: I) -> Self::ATermRef
where I: IntoIterator<Item = Self::ATermRef>,

The tuple in ATerms is represented as an application with an empty constructor string!
Source§

fn real(&'s self, value: f32) -> Self::ATermRef

Source§

fn list<I>(&'s self, value: I) -> Self::ATermRef
where I: IntoIterator<Item = Self::ATermRef>,

Source§

fn placeholder( &'s self, value: TermPlaceholder<Self::ATermRef>, ) -> Self::ATermRef

Source§

fn blob(&'s self, value: <Self::ATerm as ATermT<'s>>::Blob) -> Self::ATermRef

Source§

fn long(&'s self, value: i64) -> Self::ATermRef

Source§

impl<'s, B, H: BuildHasher + Default> Default for ATermFactory<B, H>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<B, H> !Freeze for ATermFactory<B, H>

§

impl<B, H> !RefUnwindSafe for ATermFactory<B, H>

§

impl<B, H> Send for ATermFactory<B, H>
where B: Send, H: Send,

§

impl<B, H> !Sync for ATermFactory<B, H>

§

impl<B, H> Unpin for ATermFactory<B, H>
where B: Unpin, H: Unpin,

§

impl<B, H> UnwindSafe for ATermFactory<B, H>
where B: UnwindSafe, H: UnwindSafe,

Blanket Implementations§

Source§

impl<'s, F> ATermRead<'s> for F
where F: ATermFactory<'s>,

Source§

fn read_ascii<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>
where 't: 's,

Source§

fn read_taf<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>
where 't: 's,

Source§

fn read_baf<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>
where 't: 's,

Source§

fn read_saf<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>
where 't: 's,

Source§

fn read_ascii_string<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>

Source§

fn read_taf_string<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>

Source§

fn read_baf_string<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>

Source§

fn read_saf_string<'t>( &'s self, input: &'t str, ) -> Result<(<F as ATermFactory<'s>>::ATermRef, &'t str), Error>

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> 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, 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.