Skip to main content

WithStandardParts

Struct WithStandardParts 

Source
pub struct WithStandardParts<F>(pub F);
Expand description

The program files F, with the standard parts beside them: every file named PREFIX… is a standard part’s — read-only, whatever F holds by that name — and every other is F’s.

Tuple Fields§

§0: F

Trait Implementations§

Source§

impl<F: Clone> Clone for WithStandardParts<F>

Source§

fn clone(&self) -> WithStandardParts<F>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<F: Debug> Debug for WithStandardParts<F>

Source§

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

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

impl<F: Default> Default for WithStandardParts<F>

Source§

fn default() -> WithStandardParts<F>

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

impl<F> Deref for WithStandardParts<F>

Source§

type Target = F

The resulting type after dereferencing.
Source§

fn deref(&self) -> &F

Dereferences the value.
Source§

impl<F> DerefMut for WithStandardParts<F>

Source§

fn deref_mut(&mut self) -> &mut F

Mutably dereferences the value.
Source§

impl<F: FileStore> FileStore for WithStandardParts<F>

Source§

fn read(&self, path: &str) -> GeopResult<String>

The text of the file path.
Source§

fn list(&self) -> Vec<String>

Every file there is, by path: programs and the files they read.
Source§

impl<F: FileStoreMut> FileStoreMut for WithStandardParts<F>

Writes go to F, but never over a standard part: those are read-only, so a write to a PREFIX… name changes nothing.

Source§

fn write(&mut self, path: &str, text: Option<String>)

Sets the file path to text, or — None — removes it.

Auto Trait Implementations§

§

impl<F> Freeze for WithStandardParts<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for WithStandardParts<F>
where F: RefUnwindSafe,

§

impl<F> Send for WithStandardParts<F>
where F: Send,

§

impl<F> Sync for WithStandardParts<F>
where F: Sync,

§

impl<F> Unpin for WithStandardParts<F>
where F: Unpin,

§

impl<F> UnsafeUnpin for WithStandardParts<F>
where F: UnsafeUnpin,

§

impl<F> UnwindSafe for WithStandardParts<F>
where F: UnwindSafe,

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> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
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<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,

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<R> TryRngCore for R
where R: RngCore + ?Sized,

Source§

type Error = Infallible

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

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Source§

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Source§

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Source§

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.