sass_alt/
SassImport.rs

1// This file is part of sass-alt. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/sass-alt/master/COPYRIGHT. No part of predicator, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2017 The developers of sass-alt. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/sass-alt/master/COPYRIGHT.
3
4
5/// Represents the three different kinds of SassImport.
6pub enum SassImport<'a, P: AsRef<Path>>
7{
8	/// Import is a relative path.
9	RelativePath(P),
10	
11	/// Import is an absolute path.
12	AbsolutePath(P),
13	
14	/// Import refers to a buffer of SCSS / SASS source bytes.
15	Source(&'a CStr),
16}
17
18impl<'a, P: AsRef<Path>> SassImport<'a, P>
19{
20	/// Create a SassImportEntry.
21	#[inline(always)]
22	pub fn into_sass_import_entry(self) -> SassImportEntry
23	{
24		SassImportEntry::new(self, None)
25	}
26}